]> git.baikalelectronics.ru Git - kernel.git/commit
af_unix: add compat_ioctl support
authorArnd Bergmann <arnd@arndb.de>
Mon, 3 Jun 2019 20:03:44 +0000 (22:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:48:52 +0000 (19:48 +0100)
commit55c7037a63900eab7fb8b14a97fdea1b9c4dde81
tree60e30394c74ddb78656dedd6ce8d372d4a51729f
parentcf387cb2cab1dd521f21a806b3eaab37eb2bb64b
af_unix: add compat_ioctl support

commit f57340c00dd614513fa869fb1adfc524baefae47 upstream.

The af_unix protocol family has a custom ioctl command (inexplicibly
based on SIOCPROTOPRIVATE), but never had a compat_ioctl handler for
32-bit applications.

Since all commands are compatible here, add a trivial wrapper that
performs the compat_ptr() conversion for SIOCOUTQ/SIOCINQ.  SIOCUNIXFILE
does not use the argument, but it doesn't hurt to also use compat_ptr()
here.

Fixes: d6873cab5003 ("unix: add ioctl to open a unix socket file with O_PATH")
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/unix/af_unix.c