Patch "arp: switch to dev_getbyhwaddr() in arp_req_set_public()" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    arp: switch to dev_getbyhwaddr() in arp_req_set_public()

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arp-switch-to-dev_getbyhwaddr-in-arp_req_set_public.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ee1c6116998682b776d67639fff5c7745270adb3
Author: Breno Leitao <leitao@xxxxxxxxxx>
Date:   Tue Feb 18 05:49:31 2025 -0800

    arp: switch to dev_getbyhwaddr() in arp_req_set_public()
    
    [ Upstream commit 4eae0ee0f1e6256d0b0b9dd6e72f1d9cf8f72e08 ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
    Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
    Link: https://patch.msgid.link/20250218-arm_fix_selftest-v5-2-d3d6892db9e1@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 59ffaa89d7b05..8fb48f42581ce 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;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux