diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/net/socket.c b/net/socket.c index b6ca6896dec6..88f759adf3af 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -69,7 +69,6 @@ | |||
69 | #include <linux/proc_fs.h> | 69 | #include <linux/proc_fs.h> |
70 | #include <linux/seq_file.h> | 70 | #include <linux/seq_file.h> |
71 | #include <linux/mutex.h> | 71 | #include <linux/mutex.h> |
72 | #include <linux/wanrouter.h> | ||
73 | #include <linux/if_bridge.h> | 72 | #include <linux/if_bridge.h> |
74 | #include <linux/if_frad.h> | 73 | #include <linux/if_frad.h> |
75 | #include <linux/if_vlan.h> | 74 | #include <linux/if_vlan.h> |
@@ -2837,7 +2836,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) | |||
2837 | } | 2836 | } |
2838 | 2837 | ||
2839 | ifr = compat_alloc_user_space(buf_size); | 2838 | ifr = compat_alloc_user_space(buf_size); |
2840 | rxnfc = (void *)ifr + ALIGN(sizeof(struct ifreq), 8); | 2839 | rxnfc = (void __user *)ifr + ALIGN(sizeof(struct ifreq), 8); |
2841 | 2840 | ||
2842 | if (copy_in_user(&ifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ)) | 2841 | if (copy_in_user(&ifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ)) |
2843 | return -EFAULT; | 2842 | return -EFAULT; |
@@ -2861,12 +2860,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) | |||
2861 | offsetof(struct ethtool_rxnfc, fs.ring_cookie)); | 2860 | offsetof(struct ethtool_rxnfc, fs.ring_cookie)); |
2862 | 2861 | ||
2863 | if (copy_in_user(rxnfc, compat_rxnfc, | 2862 | if (copy_in_user(rxnfc, compat_rxnfc, |
2864 | (void *)(&rxnfc->fs.m_ext + 1) - | 2863 | (void __user *)(&rxnfc->fs.m_ext + 1) - |
2865 | (void *)rxnfc) || | 2864 | (void __user *)rxnfc) || |
2866 | copy_in_user(&rxnfc->fs.ring_cookie, | 2865 | copy_in_user(&rxnfc->fs.ring_cookie, |
2867 | &compat_rxnfc->fs.ring_cookie, | 2866 | &compat_rxnfc->fs.ring_cookie, |
2868 | (void *)(&rxnfc->fs.location + 1) - | 2867 | (void __user *)(&rxnfc->fs.location + 1) - |
2869 | (void *)&rxnfc->fs.ring_cookie) || | 2868 | (void __user *)&rxnfc->fs.ring_cookie) || |
2870 | copy_in_user(&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt, | 2869 | copy_in_user(&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt, |
2871 | sizeof(rxnfc->rule_cnt))) | 2870 | sizeof(rxnfc->rule_cnt))) |
2872 | return -EFAULT; | 2871 | return -EFAULT; |
@@ -2878,12 +2877,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) | |||
2878 | 2877 | ||
2879 | if (convert_out) { | 2878 | if (convert_out) { |
2880 | if (copy_in_user(compat_rxnfc, rxnfc, | 2879 | if (copy_in_user(compat_rxnfc, rxnfc, |
2881 | (const void *)(&rxnfc->fs.m_ext + 1) - | 2880 | (const void __user *)(&rxnfc->fs.m_ext + 1) - |
2882 | (const void *)rxnfc) || | 2881 | (const void __user *)rxnfc) || |
2883 | copy_in_user(&compat_rxnfc->fs.ring_cookie, | 2882 | copy_in_user(&compat_rxnfc->fs.ring_cookie, |
2884 | &rxnfc->fs.ring_cookie, | 2883 | &rxnfc->fs.ring_cookie, |
2885 | (const void *)(&rxnfc->fs.location + 1) - | 2884 | (const void __user *)(&rxnfc->fs.location + 1) - |
2886 | (const void *)&rxnfc->fs.ring_cookie) || | 2885 | (const void __user *)&rxnfc->fs.ring_cookie) || |
2887 | copy_in_user(&compat_rxnfc->rule_cnt, &rxnfc->rule_cnt, | 2886 | copy_in_user(&compat_rxnfc->rule_cnt, &rxnfc->rule_cnt, |
2888 | sizeof(rxnfc->rule_cnt))) | 2887 | sizeof(rxnfc->rule_cnt))) |
2889 | return -EFAULT; | 2888 | return -EFAULT; |