diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-11-06 08:09:06 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-06 23:01:14 -0800 |
commit | 206602217747382488fcae68351673cc9103debc (patch) | |
tree | 1cdf6ce1e7fe4f41e75997b88dedb8883563b8bc /net | |
parent | 7a229387d317df525ebd19e146493db7f2694b8b (diff) | |
download | kernel_samsung_aries-206602217747382488fcae68351673cc9103debc.zip kernel_samsung_aries-206602217747382488fcae68351673cc9103debc.tar.gz kernel_samsung_aries-206602217747382488fcae68351673cc9103debc.tar.bz2 |
appletalk: handle SIOCATALKDIFADDR compat ioctl
We must not have a compat ioctl handler for SIOCATALKDIFADDR
in common code, because the same number is used in other protocols
with different data structures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/appletalk/ddp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 4b0ce2e..7cd08b4 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -1811,12 +1811,14 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) static int atalk_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { /* - * All Appletalk ioctls except SIOCATALKDIFADDR are standard. And - * SIOCATALKDIFADDR is handled by upper layer as well, so there is - * nothing to do. Eventually SIOCATALKDIFADDR should be moved - * here so there is no generic SIOCPROTOPRIVATE translation in the - * system. + * SIOCATALKDIFADDR is a SIOCPROTOPRIVATE ioctl number, so we + * cannot handle it in common code. The data we access if ifreq + * here is compatible, so we can simply call the native + * handler. */ + if (cmd == SIOCATALKDIFADDR) + return atalk_ioctl(sock, cmd, (unsigned long)compat_ptr(arg)); + return -ENOIOCTLCMD; } #endif |