summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2022-12-12 06:56:45 +0300
committerJakub Kicinski <kuba@kernel.org>2022-12-14 06:19:32 +0300
commit3d0b738fc5adf9f380702ac1424672e4b32c3781 (patch)
tree97f6527894bf96a495565ae323ed25d780dc538a /drivers/net/bonding/bond_main.c
parentf3b4a00f0f62da252c598310698dfc82ef2f2e2e (diff)
downloadlinux-3d0b738fc5adf9f380702ac1424672e4b32c3781.tar.xz
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;