Patch "tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog" 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

    tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog

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:
     tcp-dccp-complete-lockless-accesses-to-sk-sk_max_ack.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 526eb3030c02433db435d37af38ee92d1d2bb989
Author: Jason Xing <kernelxing@xxxxxxxxxxx>
Date:   Sun Mar 31 17:05:21 2024 +0800

    tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog
    
    [ Upstream commit 9a79c65f00e2b036e17af3a3a607d7d732b7affb ]
    
    Since commit 099ecf59f05b ("net: annotate lockless accesses to
    sk->sk_max_ack_backlog") decided to handle the sk_max_ack_backlog
    locklessly, there is one more function mostly called in TCP/DCCP
    cases. So this patch completes it:)
    
    Signed-off-by: Jason Xing <kernelxing@xxxxxxxxxxx>
    Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240331090521.71965-1-kerneljasonxing@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Stable-dep-of: 3479c7549fb1 ("tcp/dccp: allow a connection when sk_max_ack_backlog is zero")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 53ec06703fe4..0bf19c1926ee 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -278,7 +278,7 @@ static inline int inet_csk_reqsk_queue_len(const struct sock *sk)
 
 static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk)
 {
-	return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
+	return inet_csk_reqsk_queue_len(sk) >= READ_ONCE(sk->sk_max_ack_backlog);
 }
 
 bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req);




[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