Patch "net: dsa: fix reference counting for LAG FDBs" has been added to the 5.18-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

    net: dsa: fix reference counting for LAG FDBs

to the 5.18-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:
     net-dsa-fix-reference-counting-for-lag-fdbs.patch
and it can be found in the queue-5.18 subdirectory.

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



commit 43ae80e638fda0d574ade85ebc27ebd893ec0433
Author: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Date:   Sat Jul 23 04:24:11 2022 +0300

    net: dsa: fix reference counting for LAG FDBs
    
    [ Upstream commit c7560d1203b7a1ea0b99a5c575547e95d564b2a8 ]
    
    Due to an invalid conflict resolution on my side while working on 2
    different series (LAG FDBs and FDB isolation), dsa_switch_do_lag_fdb_add()
    does not store the database associated with a dsa_mac_addr structure.
    
    So after adding an FDB entry associated with a LAG, dsa_mac_addr_find()
    fails to find it while deleting it, because &a->db is zeroized memory
    for all stored FDB entries of lag->fdbs, and dsa_switch_do_lag_fdb_del()
    returns -ENOENT rather than deleting the entry.
    
    Fixes: c26933639b54 ("net: dsa: request drivers to perform FDB isolation")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
    Link: https://lore.kernel.org/r/20220723012411.1125066-1-vladimir.oltean@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index d8a80cf9742c..52f84ea349d2 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -363,6 +363,7 @@ static int dsa_switch_do_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag *lag,
 
 	ether_addr_copy(a->addr, addr);
 	a->vid = vid;
+	a->db = db;
 	refcount_set(&a->refcount, 1);
 	list_add_tail(&a->list, &lag->fdbs);
 



[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