1
0
Fork 0

net: correct sk_acceptq_is_full()

The "backlog" argument in listen() specifies
the maximom length of pending connections,
so the accept queue should be considered full
if there are exactly "backlog" elements.

Signed-off-by: liuyacan <yacanliu@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
rM2-mainline
liuyacan 2021-03-12 00:32:25 +08:00 committed by David S. Miller
parent 080bfa1e6d
commit f211ac1545
1 changed files with 1 additions and 1 deletions

View File

@ -936,7 +936,7 @@ static inline void sk_acceptq_added(struct sock *sk)
static inline bool sk_acceptq_is_full(const struct sock *sk)
{
return READ_ONCE(sk->sk_ack_backlog) > READ_ONCE(sk->sk_max_ack_backlog);
return READ_ONCE(sk->sk_ack_backlog) >= READ_ONCE(sk->sk_max_ack_backlog);
}
/*