]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit8d8257732cbd4547307e4428bbb771c8e851a154
tree6679a75a0c90f1d7b47f52840df1e4600d5ef0d7
parent45fc1299d963bafb34af5840066f93bc0340aabe
af_unix: add compat_ioctl support

BugLink: https://bugs.launchpad.net/bugs/1861934
commit 5f6beb9e0f633f3cc845cdd67973c506372931b4 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: ba94f3088b79 ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/unix/af_unix.c