[NET]: allow 32 bit socket ioctl in 64 bit kernel
Since the register_ioctl32_conversion() patch in the kernel is now obsolete, provide another method to allow 32 bit user space ioctls to reach the kernel. Signed-off-by: Shaun Pereira <spereira@tusc.com.au> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
67b52e554b
commit
89bbfc95d6
@ -143,6 +143,8 @@ struct proto_ops {
|
||||
struct poll_table_struct *wait);
|
||||
int (*ioctl) (struct socket *sock, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
int (*compat_ioctl) (struct socket *sock, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
int (*listen) (struct socket *sock, int len);
|
||||
int (*shutdown) (struct socket *sock, int flags);
|
||||
int (*setsockopt)(struct socket *sock, int level,
|
||||
@ -251,6 +253,8 @@ SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_
|
||||
(file, sock, wait)) \
|
||||
SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \
|
||||
unsigned long arg), (sock, cmd, arg)) \
|
||||
SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \
|
||||
unsigned long arg), (sock, cmd, arg)) \
|
||||
SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \
|
||||
SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \
|
||||
SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \
|
||||
@ -275,6 +279,7 @@ static const struct proto_ops name##_ops = { \
|
||||
.getname = __lock_##name##_getname, \
|
||||
.poll = __lock_##name##_poll, \
|
||||
.ioctl = __lock_##name##_ioctl, \
|
||||
.compat_ioctl = __lock_##name##_compat_ioctl, \
|
||||
.listen = __lock_##name##_listen, \
|
||||
.shutdown = __lock_##name##_shutdown, \
|
||||
.setsockopt = __lock_##name##_setsockopt, \
|
||||
@ -283,6 +288,7 @@ static const struct proto_ops name##_ops = { \
|
||||
.recvmsg = __lock_##name##_recvmsg, \
|
||||
.mmap = __lock_##name##_mmap, \
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#define MODULE_ALIAS_NETPROTO(proto) \
|
||||
|
Reference in New Issue
Block a user