Skip to content
Snippets Groups Projects
Commit f211ac15 authored by liuyacan's avatar liuyacan Committed by David S. Miller
Browse files

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: default avatarliuyacan <yacanliu@163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 080bfa1e
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment