[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250213-arm_fix_selftest-v4-2-26714529a6cf@debian.org>
Date: Thu, 13 Feb 2025 04:42:38 -0800
From: Breno Leitao <leitao@...ian.org>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>, David Ahern <dsahern@...nel.org>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Eric Dumazet <eric.dumazet@...il.com>, Breno Leitao <leitao@...ian.org>,
kuniyu@...zon.co.jp, ushankar@...estorage.com,
Kuniyuki Iwashima <kuniyu@...zon.com>
Subject: [PATCH net v4 2/2] 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.
Fixes: 941666c2e3e0 ("net: RCU conversion of dev_getbyhwaddr() and arp_ioctl()")
Suggested-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Signed-off-by: Breno Leitao <leitao@...ian.org>
---
net/ipv4/arp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index f23a1ec6694cb2f1bd60f28faa357fcad83c165a..814300eee39de12b959caf225f65d9190594bba9 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1077,7 +1077,7 @@ static int arp_req_set_public(struct net *net, struct arpreq *r,
__be32 mask = ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr;
if (!dev && (r->arp_flags & ATF_COM)) {
- dev = dev_getbyhwaddr_rcu(net, r->arp_ha.sa_family,
+ dev = dev_getbyhwaddr(net, r->arp_ha.sa_family,
r->arp_ha.sa_data);
if (!dev)
return -ENODEV;
--
2.43.5
Powered by blists - more mailing lists