diff options
| author | Kuniyuki Iwashima <[email protected]> | 2024-04-30 01:58:11 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-05-02 01:37:07 +0000 |
| commit | a428bfc77a4dd4ba19b7646e887fa655fcfee5a0 (patch) | |
| tree | 13874acf4864cc6ca1562982870427cd204af3e4 /net/dsa/dsa.c | |
| parent | arp: Remove a nest in arp_req_get(). (diff) | |
| download | kernel-a428bfc77a4dd4ba19b7646e887fa655fcfee5a0.tar.gz kernel-a428bfc77a4dd4ba19b7646e887fa655fcfee5a0.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/dsa/dsa.c')
0 files changed, 0 insertions, 0 deletions
