]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
Merge branch 'arp-random-clean-up-and-rcu-conversion-for-ioctl-siocgarp'
authorJakub Kicinski <kuba@kernel.org>
Thu, 2 May 2024 01:37:17 +0000 (18:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 May 2024 01:37:17 +0000 (18:37 -0700)
commit5165c48ef1afbb3e0126b36be84ffaa6f05cb6f0
tree54e09e532fed923864889afc954475987af31738
parent496bc5861c73f34e0486612f93634a9289de0dfb
parentbf4ea58874df3d43f7264709cec7fe320616552c
Merge branch 'arp-random-clean-up-and-rcu-conversion-for-ioctl-siocgarp'

Kuniyuki Iwashima says:

====================
arp: Random clean up and RCU conversion for ioctl(SIOCGARP).

arp_ioctl() holds rtnl_lock() regardless of cmd (SIOCDARP, SIOCSARP,
and SIOCGARP) to get net_device by __dev_get_by_name() and copy
dev->name safely.

In the SIOCGARP path, arp_req_get() calls neigh_lookup(), which looks
up a neighbour entry under RCU.

This series cleans up ioctl() code a bit and extends the RCU section
not to take rtnl_lock() and instead use dev_get_by_name_rcu() and
netdev_copy_name() for SIOCGARP.

v2: https://lore.kernel.org/netdev/20240425170002.68160-1-kuniyu@amazon.com/
v1: https://lore.kernel.org/netdev/20240422194755.4221-1-kuniyu@amazon.com/
====================

Link: https://lore.kernel.org/r/20240430015813.71143-1-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>