summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2022-12-12 11:56:45 +0800
committerJakub Kicinski <kuba@kernel.org>2022-12-13 19:19:32 -0800
commit3d0b738fc5adf9f380702ac1424672e4b32c3781 (patch)
tree97f6527894bf96a495565ae323ed25d780dc538a /drivers/net/bonding/bond_main.c
parentf3b4a00f0f62da252c598310698dfc82ef2f2e2e (diff)
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>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f7767afe116b..6a4bbd5aa3e0 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2699,7 +2699,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;