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

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



commit b881fe0d347d4b0ae81a9d2b74220dca1edb167c
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 a241734b10240..98f4b4a80de42 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1547,7 +1547,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