mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
7a229387d3
commit
2066022177
2 changed files with 7 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue