]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 21 Apr 2019 22:53:50 +0000 (18:53 -0400)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:47:27 +0000 (23:47 -0500)
BugLink: https://bugs.launchpad.net/bugs/1860602
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/compat_ioctl.c

index f69043dc18f62d1419edd054f7f27c5a0ec2d047..c738ae52589324a6480c4aa6fdf3f5a38017d122 100644 (file)
@@ -1455,10 +1455,11 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd,
 #endif
 
        case FICLONE:
+               goto do_ioctl;
        case FICLONERANGE:
        case FIDEDUPERANGE:
        case FS_IOC_FIEMAP:
-               goto do_ioctl;
+               goto found_handler;
 
        case FIBMAP:
        case FIGETBSZ: