mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 21:15:53 +02:00
bonding: add missed __rcu annotation for curr_active_slave
[ Upstream commit3d0b738fc5] 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@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of:e95cc44763("bonding: do failover when high prio link up") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ba44c1fe82
commit
2d31c6ed44
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user