aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c
index 713dc4833d40..b68801c7d0ab 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2875,9 +2875,14 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
2875 copy_in_user(&rxnfc->fs.ring_cookie, 2875 copy_in_user(&rxnfc->fs.ring_cookie,
2876 &compat_rxnfc->fs.ring_cookie, 2876 &compat_rxnfc->fs.ring_cookie,
2877 (void __user *)(&rxnfc->fs.location + 1) - 2877 (void __user *)(&rxnfc->fs.location + 1) -
2878 (void __user *)&rxnfc->fs.ring_cookie) || 2878 (void __user *)&rxnfc->fs.ring_cookie))
2879 copy_in_user(&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt, 2879 return -EFAULT;
2880 sizeof(rxnfc->rule_cnt))) 2880 if (ethcmd == ETHTOOL_GRXCLSRLALL) {
2881 if (put_user(rule_cnt, &rxnfc->rule_cnt))
2882 return -EFAULT;
2883 } else if (copy_in_user(&rxnfc->rule_cnt,
2884 &compat_rxnfc->rule_cnt,
2885 sizeof(rxnfc->rule_cnt)))
2881 return -EFAULT; 2886 return -EFAULT;
2882 } 2887 }
2883 2888