[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i++A224Of5B+Eu+qfiQO1mXfXVfzuejuXyfCwtK1rmMDA@mail.gmail.com>
Date: Tue, 31 Dec 2024 10:18:52 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Zhongqiu Duan <dzq.aishenghu0@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com
Subject: Re: perhaps inet_csk_reqsk_queue_is_full should also allow zero backlog
On Tue, Dec 31, 2024 at 9:24 AM Zhongqiu Duan <dzq.aishenghu0@...il.com> wrote:
>
> Hi all,
>
> We use a proprietary library in our product, it passes hardcoded zero
> as the backlog of listen().
> It works fine when syncookies is enabled, but when we disable syncookies
> by business requirement, no connection can be made.
>
> After some investigation, the problem is focused on the
> inet_csk_reqsk_queue_is_full().
>
> 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);
> }
>
> I noticed that the stories happened to sk_acceptq_is_full() about this
> in the past, like
> the commit c609e6a (Revert "net: correct sk_acceptq_is_full()").
>
> Perhaps we can also avoid the problem by using ">" in the decision
> condition like
> `inet_csk_reqsk_queue_len(sk) > READ_ONCE(sk->sk_max_ack_backlog)`.
>
> Best regards,
> Zhongqiu
Not sure I understand the issue you have, it seems to Work As Intended ?
If you do not post a RFC patch, it is hard to follow what is the suggestion.
Powered by blists - more mailing lists