git: network - Fix race in accept()

Matthew Dillon dillon at
Thu Sep 16 23:03:04 PDT 2010

commit c19fdb0e337965597a1be65123c93c2b0fdf1d1b
Author: Matthew Dillon <dillon at>
Date:   Thu Sep 16 23:00:26 2010 -0700

    network - Fix race in accept()
    * Fix a race where a socket undergoing an accept() was not being
      referenced soon enough, resulting in a window of opportunity for
      the kernel to attempt to free it if the tcp connection resets
      before userland can finish the accept.
      This resulted in an assertion panic.
    Reported-by: Peter Avalos

Summary of changes:
 sys/kern/uipc_socket.c            |    5 ++++-
 sys/kern/uipc_syscalls.c          |   17 ++++++++++++-----
 sys/netgraph/ksocket/ng_ksocket.c |    7 ++++---
 3 files changed, 20 insertions(+), 9 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list