]> www.infradead.org Git - users/willy/pagecache.git/commit
arp: switch to dev_getbyhwaddr() in arp_req_set_public()
authorBreno Leitao <leitao@debian.org>
Tue, 18 Feb 2025 13:49:31 +0000 (05:49 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Feb 2025 03:00:01 +0000 (19:00 -0800)
commit4eae0ee0f1e6256d0b0b9dd6e72f1d9cf8f72e08
tree818ebc8875ac63355786b92f4ec53a02d614a356
parent4b5a28b38c4a0106c64416a1b2042405166b26ce
arp: switch to dev_getbyhwaddr() in arp_req_set_public()

The arp_req_set_public() function is called with the rtnl lock held,
which provides enough synchronization protection. This makes the RCU
variant of dev_getbyhwaddr() unnecessary. Switch to using the simpler
dev_getbyhwaddr() function since we already have the required rtnl
locking.

This change helps maintain consistency in the networking code by using
the appropriate helper function for the existing locking context.
Since we're not holding the RCU read lock in arp_req_set_public()
existing code could trigger false positive locking warnings.

Fixes: 941666c2e3e0 ("net: RCU conversion of dev_getbyhwaddr() and arp_ioctl()")
Suggested-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20250218-arm_fix_selftest-v5-2-d3d6892db9e1@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/arp.c