Patch "bonding: add missed __rcu annotation for curr_active_slave" 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

    bonding: add missed __rcu annotation for curr_active_slave

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:
     bonding-add-missed-__rcu-annotation-for-curr_active_.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 f1f4039c11f2672cfc15f6ca1c7b1d3a509bac2c
Author: Hangbin Liu <liuhangbin@xxxxxxxxx>
Date:   Mon Dec 12 11:56:45 2022 +0800

    bonding: add missed __rcu annotation for curr_active_slave
    
    [ Upstream commit 3d0b738fc5adf9f380702ac1424672e4b32c3781 ]
    
    There is one direct accesses to bond->curr_active_slave in
    bond_miimon_commit(). Protected it by rcu_access_pointer()
    since the later of this function also use this one.
    
    Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxx>
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Stable-dep-of: e95cc44763a4 ("bonding: do failover when high prio link up")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 445c23e424f7..36a8db140388 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2698,7 +2698,7 @@ static void bond_miimon_commit(struct bonding *bond)
 
 			bond_miimon_link_change(bond, slave, BOND_LINK_UP);
 
-			if (!bond->curr_active_slave || slave == primary)
+			if (!rcu_access_pointer(bond->curr_active_slave) || slave == primary)
 				goto do_failover;
 
 			continue;



[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