OSDN Git Service

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)
commitccb0e7d1c1bc222966085550e27957c17138b629
tree8640be8a98f735e9e0f22437ee99d1a1cd2055b3
parent5811375325420052fcadd944792a416a43072b7f
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