Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ceph: fix compat_ioctl for ceph_dir_operations

The ceph_ioctl function is used both for files and directories, but only
the files support doing that in 32-bit compat mode.

On the s390 architecture, there is also a problem with invalid 31-bit
pointers that need to be passed through compat_ptr().

Use the new compat_ptr_ioctl() to address both issues.

Note: When backporting this patch to stable kernels, "compat_ioctl:
add compat_ptr_ioctl()" is needed as well.

Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+2 -1
+1
fs/ceph/dir.c
··· 1808 1808 .open = ceph_open, 1809 1809 .release = ceph_release, 1810 1810 .unlocked_ioctl = ceph_ioctl, 1811 + .compat_ioctl = compat_ptr_ioctl, 1811 1812 .fsync = ceph_fsync, 1812 1813 .lock = ceph_lock, 1813 1814 .flock = ceph_flock,
+1 -1
fs/ceph/file.c
··· 2162 2162 .splice_read = generic_file_splice_read, 2163 2163 .splice_write = iter_file_splice_write, 2164 2164 .unlocked_ioctl = ceph_ioctl, 2165 - .compat_ioctl = ceph_ioctl, 2165 + .compat_ioctl = compat_ptr_ioctl, 2166 2166 .fallocate = ceph_fallocate, 2167 2167 .copy_file_range = ceph_copy_file_range, 2168 2168 };