Patch "net: add missing READ_ONCE(sk->sk_rcvlowat) annotation" has been added to the 5.15-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 READ_ONCE(sk->sk_rcvlowat) annotation

to the 5.15-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-read_once-sk-sk_rcvlowat-annotation.patch
and it can be found in the queue-5.15 subdirectory.

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



commit d07231958761825a4c5017281fdd4152c523bc2d
Author: Eric Dumazet <edumazet@xxxxxxxxxx>
Date:   Fri Jul 28 15:03:11 2023 +0000

    net: add missing READ_ONCE(sk->sk_rcvlowat) annotation
    
    [ Upstream commit e6d12bdb435d23ff6c1890c852d85408a2f496ee ]
    
    In a prior commit, I forgot to change sk_getsockopt()
    when reading sk->sk_rcvlowat locklessly.
    
    Fixes: eac66402d1c3 ("net: annotate sk->sk_rcvlowat lockless reads")
    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 d392efa0d9551..ffd566d52eec3 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1549,7 +1549,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
 		break;
 
 	case SO_RCVLOWAT:
-		v.val = sk->sk_rcvlowat;
+		v.val = READ_ONCE(sk->sk_rcvlowat);
 		break;
 
 	case SO_SNDLOWAT:



[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