linux-stable/include/uapi
Qu Wenruo 5492d40812 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-17 11:35:55 +02:00
..
asm-generic aio: fix use-after-free due to missing POLLFREE handling 2021-12-14 14:49:02 +01:00
drm drm/amdgpu: return tcc_disabled_mask to userspace 2019-10-02 12:58:33 -05:00
linux btrfs: scrub: reject unsupported scrub flags 2023-05-17 11:35:55 +02:00
misc habanalabs: stop using the acronym KMD 2019-09-05 14:55:27 +03:00
mtd
rdma rdma: Remove nes ABI header 2020-01-17 19:48:39 +01:00
scsi
sound ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT 2023-01-18 11:41:04 +01:00
video
xen
Kbuild