diff options
author | David Sterba <dsterba@suse.com> | 2023-10-10 16:27:56 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-10-10 16:27:56 +0300 |
commit | 54f67decddeb47680f08c720c94b4d4f67181442 (patch) | |
tree | 3b76a53c0c3164fc103aaa1e4a1e1f70731e1a12 /fs/btrfs/super.c | |
parent | e36f94914021e58ee88a8856c7fdf35adf9c7ee1 (diff) | |
download | linux-54f67decddeb47680f08c720c94b4d4f67181442.tar.xz |
Revert "btrfs: reject unknown mount options early"
This reverts commit 5f521494cc73520ffac18ede0758883b9aedd018.
The patch breaks mounts with security mount options like
$ mount -o context=system_u:object_r:root_t:s0 /dev/sdX /mn
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdX, missing codepage or helper program, ...
We cannot reject all unknown options in btrfs_parse_subvol_options() as
intended, the security options can be present at this point and it's not
possible to enumerate them in a future proof way. This means unknown
mount options are silently accepted like before when the filesystem is
mounted with either -o subvol=/path or as followup mounts of the same
device.
Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index f49e597e197f..1a093ec0f7e3 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -954,10 +954,6 @@ static int btrfs_parse_subvol_options(const char *options, char **subvol_name, *subvol_objectid = subvolid; break; - case Opt_err: - btrfs_err(NULL, "unrecognized mount option '%s'", p); - error = -EINVAL; - goto out; default: break; } |