From owner-cvs-sys Mon Mar 31 04:30:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA14445 for cvs-sys-outgoing; Mon, 31 Mar 1997 04:30:06 -0800 (PST) Received: (from davidg@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA14438; Mon, 31 Mar 1997 04:30:04 -0800 (PST) Date: Mon, 31 Mar 1997 04:30:04 -0800 (PST) From: David Greenman Message-Id: <199703311230.EAA14438@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/kern uipc_socket2.c uipc_syscalls.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk davidg 97/03/31 04:30:03 Modified: sys/kern uipc_socket2.c uipc_syscalls.c Log: In accept1(), falloc() is called after the process has awoken, but prior to removing the connection from the queue. The problem here is that falloc() may block and this would allow another process to accept the connection instead. If this happens to leave the queue empty, then the system will panic with an "accept: nothing queued". Also changed a wakeup() to a wakeup_one() to avoid the "thundering herd" problem on new connections in Apache (or any other application that has multiple processes blocked in accept() for the same socket). Revision Changes Path 1.23 +3 -3 src/sys/kern/uipc_socket2.c 1.24 +22 -6 src/sys/kern/uipc_syscalls.c