Files
linux/net
Kuniyuki Iwashima a428bfc77a arp: Get dev after calling arp_req_(delete|set|get)().
arp_ioctl() holds rtnl_lock() first 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.

We will extend the RCU section not to take rtnl_lock() and instead
use dev_get_by_name_rcu() for SIOCGARP.

As a preparation, let's move __dev_get_by_name() into another
function and call it from arp_req_delete(), arp_req_set(), and
arp_req_get().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20240430015813.71143-6-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-05-01 18:37:07 -07:00
..
2024-04-30 18:32:38 -07:00
2024-04-26 15:34:00 +02:00
2024-04-30 18:32:38 -07:00
2024-04-30 18:32:38 -07:00
2024-03-29 15:03:11 -07:00
2024-04-30 18:46:52 -07:00
2024-04-30 18:32:38 -07:00
2023-12-12 14:24:14 +01:00
2024-01-31 16:41:16 -08:00