]> git.baikalelectronics.ru Git - kernel.git/commit
compat_ioctl: fix FIONREAD on devices
authorArnd Bergmann <arnd@arndb.de>
Fri, 7 Feb 2020 16:55:48 +0000 (17:55 +0100)
committerArnd Bergmann <arnd@arndb.de>
Sat, 8 Feb 2020 17:02:54 +0000 (18:02 +0100)
commit69ce05f957c2d59e2c887035e3b5e04f29dad47d
tree3170c2624e96172f2dffa1622bdab8369e88a83b
parentf956e418bf78212809980a8202efc907d39f7bcd
compat_ioctl: fix FIONREAD on devices

My final cleanup patch for sys_compat_ioctl() introduced a regression on
the FIONREAD ioctl command, which is used for both regular and special
files, but only works on regular files after my patch, as I had missed
the warning that Al Viro put into a comment right above it.

Change it back so it can work on any file again by moving the implementation
to do_vfs_ioctl() instead.

Fixes: f956e418bf78 ("compat_ioctl: simplify the implementation")
Reported-and-tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Reported-and-tested-by: youling257 <youling257@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
fs/ioctl.c