cvs commit: src/sys/kern uipc_sockbuf.c

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Apr 21 21:10:51 PDT 2007


dillon      2007/04/21 21:09:00 PDT

DragonFly src repository

  Modified files:
    sys/kern             uipc_sockbuf.c 
  Log:
  sbappendcontrol() was improperly setting sb_lastmbuf, creating a possible
  mbuf leak and/or sb_cc count mismatch.  The passed mbuf 'm' is a chain,
  not a single mbuf, and must be iterated through to locate the last mbuf.
  
  Optimize sbappend().  M_EOR is always set in the last mbuf and the sockbuf's
  sb_lastmbuf and sb_lastrecord fields can be used instead of iterating
  through all the mbufs in the sockbuf.  Only UNIX domain stream sockets used
  this function.  Normal TCP connections use the already-optimized
  sbappendstream() call.
  
  Properly propogate M_EOR in sbappendcontrol() and sbappendaddr().
  
  Do various code and comment cleanups.
  
  Revision  Changes    Path
  1.2       +66 -49    src/sys/kern/uipc_sockbuf.c


http://www.dragonflybsd.org/cvsweb/src/sys/kern/uipc_sockbuf.c.diff?r1=1.1&r2=1.2&f=u





More information about the Commits mailing list