Patch "macsec: fix detection of RXSCs when toggling offloading" has been added to the 6.0-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

    macsec: fix detection of RXSCs when toggling offloading

to the 6.0-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:
     macsec-fix-detection-of-rxscs-when-toggling-offloadi.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 4e76abff586b36e9434be46741f2ec5d19545284
Author: Sabrina Dubroca <sd@xxxxxxxxxxxxxxx>
Date:   Wed Nov 2 22:33:15 2022 +0100

    macsec: fix detection of RXSCs when toggling offloading
    
    [ Upstream commit 80df4706357a5a06bbbc70273bf2611df1ceee04 ]
    
    macsec_is_configured incorrectly uses secy->n_rx_sc to check if some
    RXSCs exist. secy->n_rx_sc only counts the number of active RXSCs, but
    there can also be inactive SCs as well, which may be stored in the
    driver (in case we're disabling offloading), or would have to be
    pushed to the device (in case we're trying to enable offloading).
    
    As long as RXSCs active on creation and never turned off, the issue is
    not visible.
    
    Fixes: dcb780fb2795 ("net: macsec: add nla support for changing the offloading selection")
    Signed-off-by: Sabrina Dubroca <sd@xxxxxxxxxxxxxxx>
    Reviewed-by: Antoine Tenart <atenart@xxxxxxxxxx>
    Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 6caab70efdb8..2add76c8064b 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -2599,7 +2599,7 @@ static bool macsec_is_configured(struct macsec_dev *macsec)
 	struct macsec_tx_sc *tx_sc = &secy->tx_sc;
 	int i;
 
-	if (secy->n_rx_sc > 0)
+	if (secy->rx_sc)
 		return true;
 
 	for (i = 0; i < MACSEC_NUM_AN; i++)



[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