summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_sockbuf.c
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2002-05-20 17:34:31 +0000
committersilby <silby@FreeBSD.org>2002-05-20 17:34:31 +0000
commit85e17a3398f1107e494a29e42348c19281ac022a (patch)
tree6c63ad4ac70309ccfb603add2381f898a8cadb38 /sys/kern/uipc_sockbuf.c
parent37bf7d0c3de117297eb7dcda3eac7acea7391a96 (diff)
downloadFreeBSD-src-85e17a3398f1107e494a29e42348c19281ac022a.zip
FreeBSD-src-85e17a3398f1107e494a29e42348c19281ac022a.tar.gz
Subtle fix to the accept filter LRU code. In some cases, a newly
initialized socket with no qlimit was being passed in. In order to handle this case properly, we must not use >= when comparing queue sizes to qlimit. As a result of this improper handling, a panic could result in certain cases. PR: 38325 MFC after: 3 days
Diffstat (limited to 'sys/kern/uipc_sockbuf.c')
-rw-r--r--sys/kern/uipc_sockbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index c395d87..2a7c343 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -231,7 +231,7 @@ sonewconn(head, connstatus)
SOCK_UNLOCK(so);
head->so_qlen++;
} else {
- if (head->so_incqlen >= head->so_qlimit) {
+ if (head->so_incqlen > head->so_qlimit) {
struct socket *sp;
sp = TAILQ_FIRST(&head->so_incomp);
(void) soabort(sp);
OpenPOWER on IntegriCloud