DragonFly BSD
DragonFly commits List (threaded) for 2005-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/kern uipc_socket.c uipc_socket2.c src/sys/sys socketvar.h


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Jul 2005 00:28:36 -0700 (PDT)

dillon      2005/07/23 00:28:36 PDT

DragonFly src repository

  Modified files:
    sys/kern             uipc_socket.c uipc_socket2.c 
    sys/sys              socketvar.h 
  Log:
  Fix a sockbuf race.  Currently the m_free*() path can block, due to
  objcache_put() blocking when it must access the global depot.  This breaks
  the critical section *AND the BGL during a time when the sockbuf state is
  inconsistent.  Another process accessing the same sockbuf would then
  corrupt it.  Since depot access is fairly rare, this bug typically required
  a number of hours to reproduce.
  
  Delay the actual freeing of mbufs until after the sockbuf state has been
  updated.  Encapsulate common operations in a procedure, and add additional
  assertions.  NULL out sb_lastrecord when it becomes invalid, and add a
  considerable amount of debugging code.
  
  SOCKBUF_DEBUG has been added.  Note that this is a VERY EXPENSIVE
  kernel compile option which should only be used when specifically debugging
  the networking subsystem.
  
  This is a stabilization patch is rather hackish.  A better cleanup will
  occur once we are sure we've fixed all the bugs.
  
  sbcheck provided by: Jeffrey Hsu
  Reported-by: David Rhodus, Peter Avalos, YONETANI Tomokazu,
  	     Tomaz Borstnar, and numerous other people.
  
  Revision  Changes    Path
  1.36      +80 -72    src/sys/kern/uipc_socket.c
  1.22      +168 -58   src/sys/kern/uipc_socket2.c
  1.20      +9 -1      src/sys/sys/socketvar.h


http://www.dragonflybsd.org/cvsweb/src/sys/kern/uipc_socket.c.diff?r1=1.35&r2=1.36&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/uipc_socket2.c.diff?r1=1.21&r2=1.22&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/socketvar.h.diff?r1=1.19&r2=1.20&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]