cvs commit: src/sys/netinet tcp_subr.c

Robert Watson rwatson at FreeBSD.org
Sat Dec 30 08:03:44 PST 2006


rwatson     2006-12-30 16:03:44 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/netinet          tcp_subr.c 
  Log:
  Merge tcp_subr.c:1.251 from HEAD to RELENG_6:
  
    Fix race conditions on enumerating pcb lists by moving the initialization
    (and where appropriate the destruction) of the pcb mutex to the
    init/finit functions of the pcb zones.  This allows locking of the pcb
    entries and race condition free comparison of the generation count.
    Rearrange locking a bit to avoid extra locking operation to update the
    generation count in in_pcballoc().  (in_pcballoc now returns the pcb
    locked)
  
    I am planning to convert pcb list handling from a type safe to a
    reference count model soon.  (As this allows really freeing the PCBs)
  
    Reviewed by:    rwatson, mohans
  
  This was missed in jhb's earlier MFC, and lead to a panic when creating
  TCP sockets.
  
  Reported by:    Larry Rosenman <ler at lerctr dot org>
                  Henrik Brix Andersen <henrik at brixandersen dot dk>
                  Karol Kwiatkowski <freebsd at orchid dot homeunix dot org>
                  Danny Braniss <danny at cs dot huji dot ac dot il>
                  Torfinn Ingolfsen <torfinn dot ingolfsen at broadpark dot no>
  
  Revision    Changes    Path
  1.228.2.13  +14 -2     src/sys/netinet/tcp_subr.c


More information about the cvs-src mailing list