linux-stable/include/uapi
Qu Wenruo ed7e8beb20 btrfs: scrub: reject unsupported scrub flags
commit 604e6681e1 upstream.

Since the introduction of scrub interface, the only flag that we support
is BTRFS_SCRUB_READONLY.  Thus there is no sanity checks, if there are
some undefined flags passed in, we just ignore them.

This is problematic if we want to introduce new scrub flags, as we have
no way to determine if such flags are supported.

Address the problem by introducing a check for the flags, and if
unsupported flags are set, return -EOPNOTSUPP to inform the user space.

This check should be backported for all supported kernels before any new
scrub flags are introduced.

CC: stable@vger.kernel.org # 4.14+
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-11 23:00:39 +09:00
..
asm-generic signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:22:48 +02:00
drm drm/fourcc: Add packed 10bit YUV 4:2:0 format 2022-12-31 13:14:10 +01:00
linux btrfs: scrub: reject unsupported scrub flags 2023-05-11 23:00:39 +09:00
misc habanalabs: fix resetting args in wait for CS IOCTL 2021-09-29 12:18:48 +03:00
mtd
rdma RDMA/mlx5: Don't compare mkey tags in DEVX indirect mkey 2022-10-26 12:35:03 +02:00
scsi scsi: fc: Add EDC ELS definition 2021-08-24 22:56:33 -04:00
sound ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT 2022-12-31 13:14:11 +01:00
video
xen
Kbuild