Skip to content

Commit 3d0b738

Browse files
liuhangbinkuba-moo
authored andcommitted
bonding: add missed __rcu annotation for curr_active_slave
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>
1 parent f3b4a00 commit 3d0b738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,7 @@ static void bond_miimon_commit(struct bonding *bond)
26992699

27002700
bond_miimon_link_change(bond, slave, BOND_LINK_UP);
27012701

2702-
if (!bond->curr_active_slave || slave == primary)
2702+
if (!rcu_access_pointer(bond->curr_active_slave) || slave == primary)
27032703
goto do_failover;
27042704

27052705
continue;

0 commit comments

Comments
 (0)