]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2025 14:31:44 +0000 (15:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2025 14:31:44 +0000 (15:31 +0100)
added patches:
ethtool-ntuple-fix-rss-ring_cookie-check.patch

queue-6.12/ethtool-ntuple-fix-rss-ring_cookie-check.patch [new file with mode: 0644]

diff --git a/queue-6.12/ethtool-ntuple-fix-rss-ring_cookie-check.patch b/queue-6.12/ethtool-ntuple-fix-rss-ring_cookie-check.patch
new file mode 100644 (file)
index 0000000..d3c0fac
--- /dev/null
@@ -0,0 +1,34 @@
+From 2b91cc1214b165c25ac9b0885db89a0d3224028a Mon Sep 17 00:00:00 2001
+From: Jakub Kicinski <kuba@kernel.org>
+Date: Fri, 31 Jan 2025 17:30:38 -0800
+Subject: ethtool: ntuple: fix rss + ring_cookie check
+
+From: Jakub Kicinski <kuba@kernel.org>
+
+commit 2b91cc1214b165c25ac9b0885db89a0d3224028a upstream.
+
+The info.flow_type is for RXFH commands, ntuple flow_type is inside
+the flow spec. The check currently does nothing, as info.flow_type
+is 0 (or even uninitialized by user space) for ETHTOOL_SRXCLSRLINS.
+
+Fixes: 9e43ad7a1ede ("net: ethtool: only allow set_rxnfc with rss + ring_cookie if driver opts in")
+Reviewed-by: Gal Pressman <gal@nvidia.com>
+Reviewed-by: Joe Damato <jdamato@fastly.com>
+Link: https://patch.msgid.link/20250201013040.725123-3-kuba@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ethtool/ioctl.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ethtool/ioctl.c
++++ b/net/ethtool/ioctl.c
+@@ -993,7 +993,7 @@ static noinline_for_stack int ethtool_se
+               return rc;
+       /* Nonzero ring with RSS only makes sense if NIC adds them together */
+-      if (cmd == ETHTOOL_SRXCLSRLINS && info.flow_type & FLOW_RSS &&
++      if (cmd == ETHTOOL_SRXCLSRLINS && info.fs.flow_type & FLOW_RSS &&
+           !ops->cap_rss_rxnfc_adds &&
+           ethtool_get_flow_spec_ring(info.fs.ring_cookie))
+               return -EINVAL;