diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-08-31 09:06:04 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-08-31 09:06:04 -0700 |
commit | 29ce8f9701072fc221d9c38ad952de1a9578f95c (patch) | |
tree | 054ead168bcd34a90ba924a22d94eeeffd79167c /include | |
parent | c3496da580b0fc10fdeba8f6a5e6aef4c78b5598 (diff) | |
parent | 57f780f1c43362b86fd23d20bd940e2468237716 (diff) | |
download | linux-29ce8f9701072fc221d9c38ad952de1a9578f95c.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include/linux/netdevice.h
net/socket.c
d0efb16294d1 ("net: don't unconditionally copy_from_user a struct ifreq for socket ioctls")
876f0bf9d0d5 ("net: socket: simplify dev_ifconf handling")
29c4964822aa ("net: socket: rework compat_ifreq_ioctl()")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 6fd3a4d42668..7c41593c1d6a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4027,6 +4027,10 @@ int netdev_rx_handler_register(struct net_device *dev, void netdev_rx_handler_unregister(struct net_device *dev); bool dev_valid_name(const char *name); +static inline bool is_socket_ioctl_cmd(unsigned int cmd) +{ + return _IOC_TYPE(cmd) == SOCK_IOC_TYPE; +} int get_user_ifreq(struct ifreq *ifr, void __user **ifrdata, void __user *arg); int put_user_ifreq(struct ifreq *ifr, void __user *arg); int dev_ioctl(struct net *net, unsigned int cmd, struct ifreq *ifr, |