• Arnd Bergmann's avatar
    af_unix: add compat_ioctl support · 3ed02603
    Arnd Bergmann authored
    commit 5f6beb9e 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: ba94f308 ("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: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    3ed02603
af_unix.c 68.7 KB