Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 1997 04:30:04 -0800 (PST)
From:      David Greenman <davidg>
To:        CVS-committers, cvs-all, cvs-sys
Subject:   cvs commit:  src/sys/kern uipc_socket2.c uipc_syscalls.c
Message-ID:  <199703311230.EAA14438@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703311230.EAA14438>