Skip to content

Commit 7c402f7

Browse files
azaki1kuba-moo
authored andcommitted
net: ethtool: copy input_xfrm to user-space in ethtool_get_rxfh
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]>
1 parent 8dc4c41 commit 7c402f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/ethtool/ioctl.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,11 @@ static noinline_for_stack int ethtool_get_rxfh(struct net_device *dev,
12511251
if (copy_to_user(useraddr + offsetof(struct ethtool_rxfh, hfunc),
12521252
&rxfh_dev.hfunc, sizeof(rxfh.hfunc))) {
12531253
ret = -EFAULT;
1254+
} else if (copy_to_user(useraddr +
1255+
offsetof(struct ethtool_rxfh, input_xfrm),
1256+
&rxfh_dev.input_xfrm,
1257+
sizeof(rxfh.input_xfrm))) {
1258+
ret = -EFAULT;
12541259
} else if (copy_to_user(useraddr +
12551260
offsetof(struct ethtool_rxfh, rss_config[0]),
12561261
rss_config, total_size)) {

0 commit comments

Comments
 (0)