summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorliuyacan <yacanliu@163.com>2021-03-12 00:32:25 +0800
committerDavid S. Miller <davem@davemloft.net>2021-03-12 12:27:14 -0800
commitf211ac154577ec9ccf07c15f18a6abf0d9bdb4ab (patch)
tree058291b43c925bd06f6529f844083edcfa631631 /include/net
parent080bfa1e6d928a5d1f185cc44e5f3c251df06df5 (diff)
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>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 636810ddcd9b..0b6266fd6bf6 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -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);
}
/*