diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-11-06 03:09:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-07 02:01:14 -0500 |
commit | 206602217747382488fcae68351673cc9103debc (patch) | |
tree | 1cdf6ce1e7fe4f41e75997b88dedb8883563b8bc | |
parent | 7a229387d317df525ebd19e146493db7f2694b8b (diff) |
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>
-rw-r--r-- | fs/compat_ioctl.c | 1 | ||||
-rw-r--r-- | net/appletalk/ddp.c | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index f4a5a01fc661..50d2a5fdc94a 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -2536,7 +2536,6 @@ HANDLE_IOCTL(SIOCSIFHWBROADCAST, dev_ifsioc) | |||
2536 | HANDLE_IOCTL(SIOCSHWTSTAMP, dev_ifsioc) | 2536 | HANDLE_IOCTL(SIOCSHWTSTAMP, dev_ifsioc) |
2537 | 2537 | ||
2538 | /* ioctls used by appletalk ddp.c */ | 2538 | /* ioctls used by appletalk ddp.c */ |
2539 | HANDLE_IOCTL(SIOCATALKDIFADDR, dev_ifsioc) | ||
2540 | HANDLE_IOCTL(SIOCDIFADDR, dev_ifsioc) | 2539 | HANDLE_IOCTL(SIOCDIFADDR, dev_ifsioc) |
2541 | HANDLE_IOCTL(SIOCSARP, dev_ifsioc) | 2540 | HANDLE_IOCTL(SIOCSARP, dev_ifsioc) |
2542 | HANDLE_IOCTL(SIOCDARP, dev_ifsioc) | 2541 | HANDLE_IOCTL(SIOCDARP, dev_ifsioc) |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 4b0ce2e2b46e..7cd08b45c52b 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) | |||
1811 | static int atalk_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | 1811 | static int atalk_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) |
1812 | { | 1812 | { |
1813 | /* | 1813 | /* |
1814 | * All Appletalk ioctls except SIOCATALKDIFADDR are standard. And | 1814 | * SIOCATALKDIFADDR is a SIOCPROTOPRIVATE ioctl number, so we |
1815 | * SIOCATALKDIFADDR is handled by upper layer as well, so there is | 1815 | * cannot handle it in common code. The data we access if ifreq |
1816 | * nothing to do. Eventually SIOCATALKDIFADDR should be moved | 1816 | * here is compatible, so we can simply call the native |
1817 | * here so there is no generic SIOCPROTOPRIVATE translation in the | 1817 | * handler. |
1818 | * system. | ||
1819 | */ | 1818 | */ |
1819 | if (cmd == SIOCATALKDIFADDR) | ||
1820 | return atalk_ioctl(sock, cmd, (unsigned long)compat_ptr(arg)); | ||
1821 | |||
1820 | return -ENOIOCTLCMD; | 1822 | return -ENOIOCTLCMD; |
1821 | } | 1823 | } |
1822 | #endif | 1824 | #endif |