linux-stable/fs/fuse
Miklos Szeredi c828e913c8 fuse: ioctl: translate ENOSYS in outarg
commit 6a567e920f upstream.

Fuse shouldn't return ENOSYS from its ioctl implementation. If userspace
responds with ENOSYS it should be translated to ENOTTY.

There are two ways to return an error from the IOCTL request:

 - fuse_out_header.error
 - fuse_ioctl_out.result

Commit 02c0cab8e7 ("fuse: ioctl: translate ENOSYS") already fixed this
issue for the first case, but missed the second case.  This patch fixes the
second case.

Reported-by: Jonathan Katz <jkatz@eitmlabs.org>
Closes: https://lore.kernel.org/all/CALKgVmcC1VUV_gJVq70n--omMJZUb4HSh_FqvLTHgNBc+HCLFQ@mail.gmail.com/
Fixes: 02c0cab8e7 ("fuse: ioctl: translate ENOSYS")
Cc: <stable@vger.kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 08:50:25 +02:00
..
acl.c
control.c
cuse.c
dax.c
dev.c mm: multi-gen LRU: groundwork 2022-09-26 19:46:09 -07:00
dir.c fuse: revalidate: don't invalidate if interrupted 2023-07-27 08:50:25 +02:00
file.c attr: use consistent sgid stripping checks 2023-03-03 11:52:25 +01:00
fuse_i.h
inode.c fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT 2023-07-27 08:50:25 +02:00
ioctl.c fuse: ioctl: translate ENOSYS in outarg 2023-07-27 08:50:25 +02:00
Kconfig
Makefile
readdir.c fuse: fix readdir cache race 2022-10-20 17:18:58 +02:00
virtio_fs.c
xattr.c