aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/socket.c b/net/socket.c
index 5212447c86e7..575c84f2af19 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2643,13 +2643,13 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
2643 return -EFAULT; 2643 return -EFAULT;
2644 2644
2645 if (convert_in) { 2645 if (convert_in) {
2646 /* We expect there to be holes between fs.m_u and 2646 /* We expect there to be holes between fs.m_ext and
2647 * fs.ring_cookie and at the end of fs, but nowhere else. 2647 * fs.ring_cookie and at the end of fs, but nowhere else.
2648 */ 2648 */
2649 BUILD_BUG_ON(offsetof(struct compat_ethtool_rxnfc, fs.m_u) + 2649 BUILD_BUG_ON(offsetof(struct compat_ethtool_rxnfc, fs.m_ext) +
2650 sizeof(compat_rxnfc->fs.m_u) != 2650 sizeof(compat_rxnfc->fs.m_ext) !=
2651 offsetof(struct ethtool_rxnfc, fs.m_u) + 2651 offsetof(struct ethtool_rxnfc, fs.m_ext) +
2652 sizeof(rxnfc->fs.m_u)); 2652 sizeof(rxnfc->fs.m_ext));
2653 BUILD_BUG_ON( 2653 BUILD_BUG_ON(
2654 offsetof(struct compat_ethtool_rxnfc, fs.location) - 2654 offsetof(struct compat_ethtool_rxnfc, fs.location) -
2655 offsetof(struct compat_ethtool_rxnfc, fs.ring_cookie) != 2655 offsetof(struct compat_ethtool_rxnfc, fs.ring_cookie) !=
@@ -2657,7 +2657,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
2657 offsetof(struct ethtool_rxnfc, fs.ring_cookie)); 2657 offsetof(struct ethtool_rxnfc, fs.ring_cookie));
2658 2658
2659 if (copy_in_user(rxnfc, compat_rxnfc, 2659 if (copy_in_user(rxnfc, compat_rxnfc,
2660 (void *)(&rxnfc->fs.m_u + 1) - 2660 (void *)(&rxnfc->fs.m_ext + 1) -
2661 (void *)rxnfc) || 2661 (void *)rxnfc) ||
2662 copy_in_user(&rxnfc->fs.ring_cookie, 2662 copy_in_user(&rxnfc->fs.ring_cookie,
2663 &compat_rxnfc->fs.ring_cookie, 2663 &compat_rxnfc->fs.ring_cookie,
@@ -2674,7 +2674,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
2674 2674
2675 if (convert_out) { 2675 if (convert_out) {
2676 if (copy_in_user(compat_rxnfc, rxnfc, 2676 if (copy_in_user(compat_rxnfc, rxnfc,
2677 (const void *)(&rxnfc->fs.m_u + 1) - 2677 (const void *)(&rxnfc->fs.m_ext + 1) -
2678 (const void *)rxnfc) || 2678 (const void *)rxnfc) ||
2679 copy_in_user(&compat_rxnfc->fs.ring_cookie, 2679 copy_in_user(&compat_rxnfc->fs.ring_cookie,
2680 &rxnfc->fs.ring_cookie, 2680 &rxnfc->fs.ring_cookie,