diff options
author | Eric Dumazet <edumazet@google.com> | 2024-04-08 21:04:37 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-04-10 02:31:45 +0200 |
commit | 662e451d9a6224ff7fbec8e94c2da75b93258df3 (patch) | |
tree | c46b6b66eb2ed9ecf7307bbbf6b7ef45eb12bf56 /drivers/net/bonding/bond_main.c | |
parent | bonding: no longer use RTNL in bonding_show_slaves() (diff) | |
download | linux-662e451d9a6224ff7fbec8e94c2da75b93258df3.tar.xz linux-662e451d9a6224ff7fbec8e94c2da75b93258df3.zip |
bonding: no longer use RTNL in bonding_show_queue_id()
Annotate lockless reads of slave->queue_id.
Annotate writes of slave->queue_id.
Switch bonding_show_queue_id() to rcu_read_lock()
and bond_for_each_slave_rcu().
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Link: https://lore.kernel.org/r/20240408190437.2214473-4-edumazet@google.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.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 08e9bdbf450a..b3a7d60c3a5c 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -5245,7 +5245,7 @@ static inline int bond_slave_override(struct bonding *bond, /* Find out if any slaves have the same mapping as this skb. */ bond_for_each_slave_rcu(bond, slave, iter) { - if (slave->queue_id == skb_get_queue_mapping(skb)) { + if (READ_ONCE(slave->queue_id) == skb_get_queue_mapping(skb)) { if (bond_slave_is_up(slave) && slave->link == BOND_LINK_UP) { bond_dev_queue_xmit(bond, skb, slave->dev); |