mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include/linux/netdevice.h net/socket.cd0efb16294
("net: don't unconditionally copy_from_user a struct ifreq for socket ioctls")876f0bf9d0
("net: socket: simplify dev_ifconf handling")29c4964822
("net: socket: rework compat_ifreq_ioctl()") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -1124,6 +1124,9 @@ static long sock_do_ioctl(struct net *net, struct socket *sock,
|
||||
if (err != -ENOIOCTLCMD)
|
||||
return err;
|
||||
|
||||
if (!is_socket_ioctl_cmd(cmd))
|
||||
return -ENOTTY;
|
||||
|
||||
if (get_user_ifreq(&ifr, &data, argp))
|
||||
return -EFAULT;
|
||||
err = dev_ioctl(net, cmd, &ifr, data, &need_copyout);
|
||||
@@ -3218,6 +3221,8 @@ static int compat_ifr_data_ioctl(struct net *net, unsigned int cmd,
|
||||
struct ifreq ifreq;
|
||||
void __user *data;
|
||||
|
||||
if (!is_socket_ioctl_cmd(cmd))
|
||||
return -ENOTTY;
|
||||
if (get_user_ifreq(&ifreq, &data, u_ifreq32))
|
||||
return -EFAULT;
|
||||
ifreq.ifr_data = data;
|
||||
|
Reference in New Issue
Block a user