Patch "ethtool: Fix set RXNFC command with symmetric RSS hash" has been added to the 6.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ethtool: Fix set RXNFC command with symmetric RSS hash

to the 6.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ethtool-fix-set-rxnfc-command-with-symmetric-rss-has.patch
and it can be found in the queue-6.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6215c5e37028fee74d0005010d223142e9e8ca57
Author: Gal Pressman <gal@xxxxxxxxxx>
Date:   Sun Jan 26 21:18:45 2025 +0200

    ethtool: Fix set RXNFC command with symmetric RSS hash
    
    [ Upstream commit 4f5a52adeb1ad675ca33f1e1eacd9c0bbaf393d4 ]
    
    The sanity check that both source and destination are set when symmetric
    RSS hash is requested is only relevant for ETHTOOL_SRXFH (rx-flow-hash),
    it should not be performed on any other commands (e.g.
    ETHTOOL_SRXCLSRLINS/ETHTOOL_SRXCLSRLDEL).
    
    This resolves accessing uninitialized 'info.data' field, and fixes false
    errors in rule insertion:
      # ethtool --config-ntuple eth2 flow-type ip4 dst-ip 255.255.255.255 action -1 loc 0
      rmgr: Cannot insert RX class rule: Invalid argument
      Cannot insert classification rule
    
    Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash")
    Cc: Ahmed Zaki <ahmed.zaki@xxxxxxxxx>
    Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Signed-off-by: Gal Pressman <gal@xxxxxxxxxx>
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@xxxxxxxxxxxxxxx>
    Reviewed-by: Edward Cree <ecree.xilinx@xxxxxxxxx>
    Reviewed-by: Ahmed Zaki <ahmed.zaki@xxxxxxxxx>
    Link: https://patch.msgid.link/20250126191845.316589-1-gal@xxxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 7bb94875a7ec8..34bee42e12470 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -998,7 +998,7 @@ static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev,
 	    ethtool_get_flow_spec_ring(info.fs.ring_cookie))
 		return -EINVAL;
 
-	if (ops->get_rxfh) {
+	if (cmd == ETHTOOL_SRXFH && ops->get_rxfh) {
 		struct ethtool_rxfh_param rxfh = {};
 
 		rc = ops->get_rxfh(dev, &rxfh);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux