projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8dc4c41
)
net: ethtool: copy input_xfrm to user-space in ethtool_get_rxfh
author
Ahmed Zaki
<ahmed.zaki@intel.com>
Thu, 21 Dec 2023 18:42:34 +0000
(11:42 -0700)
committer
Jakub Kicinski
<kuba@kernel.org>
Wed, 3 Jan 2024 00:00:06 +0000
(16:00 -0800)
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/
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>
net/ethtool/ioctl.c
patch
|
blob
|
history
diff --git
a/net/ethtool/ioctl.c
b/net/ethtool/ioctl.c
index 86d47425038b9a84c50f4e103f7201601d5b1ab5..9adc240b8f0eb0ce9858c174e9592b93a4d5341a 100644
(file)
--- a/
net/ethtool/ioctl.c
+++ b/
net/ethtool/ioctl.c
@@
-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)) {