diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2022-12-12 04:56:45 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-12-14 04:19:32 +0100 |
commit | 3d0b738fc5adf9f380702ac1424672e4b32c3781 (patch) | |
tree | 97f6527894bf96a495565ae323ed25d780dc538a /drivers/net/bonding | |
parent | net: macsec: fix net device access prior to holding a lock (diff) | |
download | linux-3d0b738fc5adf9f380702ac1424672e4b32c3781.tar.xz linux-3d0b738fc5adf9f380702ac1424672e4b32c3781.zip |
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')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 2 |
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; |