]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: verify subvolid mount parameter
authorAnand Jain <anand.jain@oracle.com>
Wed, 14 Feb 2018 17:11:37 +0000 (01:11 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:39 +0000 (15:09 +0200)
commitc5368de026e09355b69109a3dc16176478976905
tree8640be8a98f735e9e0f22437ee99d1a1cd2055b3
parent63a697dd629004dced1cbaa1d0df59cd7f0627aa
btrfs: verify subvolid mount parameter

We aren't verifying the parameter passed to the subvolid mount option,
so we won't report and fail the mount if a junk value is specified for
example, -o subvolid=abc.
This patch verifies the subvolid option with match_u64.

Up to now the memparse function accepts the K/M/G/ suffixes, that are
usually meant for size values and do not make sense for a subvolume it.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c