[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231221184235.9192-2-ahmed.zaki@intel.com>
Date: Thu, 21 Dec 2023 11:42:34 -0700
From: Ahmed Zaki <ahmed.zaki@...el.com>
To: netdev@...r.kernel.org
Cc: corbet@....net,
jesse.brandeburg@...el.com,
anthony.l.nguyen@...el.com,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
vladimir.oltean@....com,
andrew@...n.ch,
horms@...nel.org,
mkubecek@...e.cz,
willemdebruijn.kernel@...il.com,
gal@...dia.com,
alexander.duyck@...il.com,
ecree.xilinx@...il.com,
Ahmed Zaki <ahmed.zaki@...el.com>,
Jacob Keller <jacob.e.keller@...el.com>
Subject: [PATCH net-next 1/2] 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@...el.com>
Signed-off-by: Ahmed Zaki <ahmed.zaki@...el.com>
---
net/ethtool/ioctl.c | 5 +++++
1 file changed, 5 insertions(+)
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
@@ -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)) {
--
2.34.1
Powered by blists - more mailing lists