diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-21 18:53:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-09 10:17:58 +0100 |
commit | 973536f045d2850220c9b12871b38024fc75a276 (patch) | |
tree | 89351e6fe2fcc740342b075940e2c59e6cb96de2 /fs | |
parent | ee21b594af100be62eea7732b1f0114b2609c613 (diff) |
fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP
commit 6b2daec19094a90435abe67d16fb43b1a5527254 upstream.
Unlike FICLONE, all of those take a pointer argument; they do need
compat_ptr() applied to arg.
Fixes: d79bdd52d8be ("vfs: wire up compat ioctl for CLONE/CLONE_RANGE")
Fixes: 54dbc1517237 ("vfs: hoist the btrfs deduplication ioctl to the vfs")
Fixes: ceac204e1da9 ("fs: make fiemap work from compat_ioctl")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 033e8e6aabb7..f445bc9cdc94 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -1577,9 +1577,10 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, #endif case FICLONE: + goto do_ioctl; case FICLONERANGE: case FIDEDUPERANGE: - goto do_ioctl; + goto found_handler; case FIBMAP: case FIGETBSZ: |