diff options
author | Ahmed Zaki <ahmed.zaki@intel.com> | 2023-12-21 11:42:34 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-01-02 16:00:06 -0800 |
commit | 7c402f77e8cb6dd593217270e2643eeba1a89b01 (patch) | |
tree | c101fad4d7c6ccac7b8847d072a534c1914ef108 /net/ethtool | |
parent | 8dc4c410006531ddad981ca9578f83cb93860819 (diff) | |
download | linux-7c402f77e8cb6dd593217270e2643eeba1a89b01.tar.gz linux-7c402f77e8cb6dd593217270e2643eeba1a89b01.tar.bz2 linux-7c402f77e8cb6dd593217270e2643eeba1a89b01.zip |
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/20231213003321.605376-1-ahmed.zaki@intel.com/ [1]
Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash")
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
Link: https://lore.kernel.org/r/20231221184235.9192-2-ahmed.zaki@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ethtool')
-rw-r--r-- | net/ethtool/ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index 86d47425038b..9adc240b8f0e 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -1252,6 +1252,11 @@ static noinline_for_stack int ethtool_get_rxfh(struct net_device *dev, &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)) { ret = -EFAULT; |