diff options
author | Eric Dumazet | 2014-07-15 06:56:55 -0700 |
---|---|---|
committer | David S. Miller | 2014-07-15 17:49:42 -0700 |
commit | 4740d6382790077f22c606d03804f5d9f15b90d7 (patch) | |
tree | 4f607b2f834ba4f547312136316d606d62fcdac0 /drivers/net/bonding/bond_options.c | |
parent | c2646b593eb127adc50e108649e4d34144e14c6c (diff) |
bonding: add proper __rcu annotation for curr_active_slave
RCU was added to bonding in linux-3.12 but lacked proper sparse annotations.
Using __rcu annotation actually helps to spot all accesses to bond->curr_active_slave
are correctly protected, with LOCKDEP support.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Veaceslav Falico <vfalico@gmail.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_options.c')
-rw-r--r-- | drivers/net/bonding/bond_options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index b26271fd7b09..f908e65e86c1 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c @@ -743,7 +743,7 @@ static int bond_option_active_slave_set(struct bonding *bond, RCU_INIT_POINTER(bond->curr_active_slave, NULL); bond_select_active_slave(bond); } else { - struct slave *old_active = bond->curr_active_slave; + struct slave *old_active = bond_deref_active_protected(bond); struct slave *new_active = bond_slave_get_rtnl(slave_dev); BUG_ON(!new_active); |