linux-stable/include/uapi
Qu Wenruo 70f12a8f88 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:11:34 +09:00
..
asm-generic uapi: Add missing _UAPI prefix to <asm-generic/types.h> include guard 2022-12-01 16:22:06 +01:00
drm drm/virtio: exbuf->fence_fd unmodified on interrupted wait 2023-02-06 20:10:56 +03:00
linux btrfs: scrub: reject unsupported scrub flags 2023-05-11 23:11:34 +09:00
misc This tag contains habanalabs driver changes for v6.2: 2022-11-29 13:19:29 +01:00
mtd This pull request contains updates for UBI and UBIFS 2022-10-14 18:23:23 -07:00
rdma RDMA/rxe: Extend rxe user ABI to support flush 2022-12-09 19:36:01 -04:00
scsi scsi: scsi_transport_fc: Adjust struct fc_nl_event flex array usage 2022-09-25 12:52:48 -04:00
sound ASoC: Updates for v6.2 2022-12-06 11:13:26 +01:00
video
xen
Kbuild