Patch "net: add missing data-race annotation for sk_ll_usec" has been added to the 4.19-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

    net: add missing data-race annotation for sk_ll_usec

to the 4.19-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:
     net-add-missing-data-race-annotation-for-sk_ll_usec.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 683d6085ad2e0686bac1e20a4e5511c4e9f24eb4
Author: Eric Dumazet <edumazet@xxxxxxxxxx>
Date:   Fri Jul 28 15:03:17 2023 +0000

    net: add missing data-race annotation for sk_ll_usec
    
    [ Upstream commit e5f0d2dd3c2faa671711dac6d3ff3cef307bcfe3 ]
    
    In a prior commit I forgot that sk_getsockopt() reads
    sk->sk_ll_usec without holding a lock.
    
    Fixes: 0dbffbb5335a ("net: annotate data race around sk_ll_usec")
    Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/core/sock.c b/net/core/sock.c
index f112862fe0682..3e6da3694a5a5 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1349,7 +1349,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
 
 #ifdef CONFIG_NET_RX_BUSY_POLL
 	case SO_BUSY_POLL:
-		v.val = sk->sk_ll_usec;
+		v.val = READ_ONCE(sk->sk_ll_usec);
 		break;
 #endif
 



[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