bonding: no longer use RTNL in bonding_show_bonds()
authorEric Dumazet <edumazet@google.com>
Mon, 8 Apr 2024 19:04:35 +0000 (19:04 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 10 Apr 2024 00:31:45 +0000 (17:31 -0700)
commit6c5d17143fa4e433894a11cd4ce4ce147131d6bf
tree1735d4946c11e8382eba975c98c0707c4a361341
parentd034d02de882d0ac600806724f9ffeb52de11e2e
bonding: no longer use RTNL in bonding_show_bonds()

netdev structures are already RCU protected.

Change bond_init() and bond_uninit() to use RCU
enabled list_add_tail_rcu() and list_del_rcu().

Then bonding_show_bonds() can use rcu_read_lock()
while iterating through bn->dev_list.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Link: https://lore.kernel.org/r/20240408190437.2214473-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_sysfs.c