Skip to content

Commit

Permalink
net: ethtool: copy input_xfrm to user-space in ethtool_get_rxfh
Browse files Browse the repository at this point in the history
The ioctl path of ethtool's get channels is missing the final step of
copying the new input_xfrm field to user-space. This should have been
part of [1].

Link: https://lore.kernel.org/netdev/[email protected]/ [1]
Fixes: 13e5934 ("net: ethtool: add support for symmetric-xor RSS hash")
Reviewed-by: Jacob Keller <[email protected]>
Signed-off-by: Ahmed Zaki <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
azaki1 authored and kuba-moo committed Jan 3, 2024
1 parent 8dc4c41 commit 7c402f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/ethtool/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,11 @@ static noinline_for_stack int ethtool_get_rxfh(struct net_device *dev,
if (copy_to_user(useraddr + offsetof(struct ethtool_rxfh, hfunc),
&rxfh_dev.hfunc, sizeof(rxfh.hfunc))) {
ret = -EFAULT;
} else if (copy_to_user(useraddr +
offsetof(struct ethtool_rxfh, input_xfrm),
&rxfh_dev.input_xfrm,
sizeof(rxfh.input_xfrm))) {
ret = -EFAULT;
} else if (copy_to_user(useraddr +
offsetof(struct ethtool_rxfh, rss_config[0]),
rss_config, total_size)) {
Expand Down

0 comments on commit 7c402f7

Please sign in to comment.