Patch "tcp/dccp: allow a connection when sk_max_ack_backlog is zero" 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

    tcp/dccp: allow a connection when sk_max_ack_backlog is zero

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:
     tcp-dccp-allow-a-connection-when-sk_max_ack_backlog-.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 588b8aa2079a2114ea34601a969bf65924add2f4
Author: Zhongqiu Duan <dzq.aishenghu0@xxxxxxxxx>
Date:   Thu Jan 2 17:14:26 2025 +0000

    tcp/dccp: allow a connection when sk_max_ack_backlog is zero
    
    [ Upstream commit 3479c7549fb1dfa7a1db4efb7347c7b8ef50de4b ]
    
    If the backlog of listen() is set to zero, sk_acceptq_is_full() allows
    one connection to be made, but inet_csk_reqsk_queue_is_full() does not.
    When the net.ipv4.tcp_syncookies is zero, inet_csk_reqsk_queue_is_full()
    will cause an immediate drop before the sk_acceptq_is_full() check in
    tcp_conn_request(), resulting in no connection can be made.
    
    This patch tries to keep consistent with 64a146513f8f ("[NET]: Revert
    incorrect accept queue backlog changes.").
    
    Link: https://lore.kernel.org/netdev/20250102080258.53858-1-kuniyu@xxxxxxxxxx/
    Fixes: ef547f2ac16b ("tcp: remove max_qlen_log")
    Signed-off-by: Zhongqiu Duan <dzq.aishenghu0@xxxxxxxxx>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
    Reviewed-by: Jason Xing <kerneljasonxing@xxxxxxxxx>
    Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>
    Link: https://patch.msgid.link/20250102171426.915276-1-dzq.aishenghu0@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index c0deaafebfdc..4bd93571e6c1 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -281,7 +281,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) >= READ_ONCE(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