mbox series

[net-next,0/3] bonding: remove RTNL from three sysfs files

Message ID 20240408190437.2214473-1-edumazet@google.com (mailing list archive)
Headers show
Series bonding: remove RTNL from three sysfs files | expand

Message

Eric Dumazet April 8, 2024, 7:04 p.m. UTC
First patch might fix a potential deadlock.
sysfs handlers should use rtnl_trylock() instead of rtnl_lock().

Following files can be read without acquiring RTNL :

- /sys/class/net/bonding_masters
- /sys/class/net/<name>/bonding/slaves
- /sys/class/net/<name>/bonding/queue_id

Eric Dumazet (3):
  bonding: no longer use RTNL in bonding_show_bonds()
  bonding: no longer use RTNL in bonding_show_slaves()
  bonding: no longer use RTNL in bonding_show_queue_id()

 drivers/net/bonding/bond_main.c        |  6 +++---
 drivers/net/bonding/bond_netlink.c     |  3 ++-
 drivers/net/bonding/bond_options.c     |  2 +-
 drivers/net/bonding/bond_procfs.c      |  2 +-
 drivers/net/bonding/bond_sysfs.c       | 25 ++++++++++++-------------
 drivers/net/bonding/bond_sysfs_slave.c |  2 +-
 6 files changed, 20 insertions(+), 20 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 10, 2024, 12:40 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon,  8 Apr 2024 19:04:34 +0000 you wrote:
> First patch might fix a potential deadlock.
> sysfs handlers should use rtnl_trylock() instead of rtnl_lock().
> 
> Following files can be read without acquiring RTNL :
> 
> - /sys/class/net/bonding_masters
> - /sys/class/net/<name>/bonding/slaves
> - /sys/class/net/<name>/bonding/queue_id
> 
> [...]

Here is the summary with links:
  - [net-next,1/3] bonding: no longer use RTNL in bonding_show_bonds()
    https://git.kernel.org/netdev/net-next/c/6c5d17143fa4
  - [net-next,2/3] bonding: no longer use RTNL in bonding_show_slaves()
    https://git.kernel.org/netdev/net-next/c/d67fed98caa1
  - [net-next,3/3] bonding: no longer use RTNL in bonding_show_queue_id()
    https://git.kernel.org/netdev/net-next/c/662e451d9a62

You are awesome, thank you!