cvs commit: src/sys/kern uipc_mbuf.c

Mike Silbersack silby at FreeBSD.org
Sun Jul 20 20:12:07 PDT 2003


silby       2003/07/20 20:12:06 PDT

  FreeBSD src repository

  Modified files:        (Branch: RELENG_4)
    sys/kern             uipc_mbuf.c 
  Log:
  Add in the promised cluster refcount limit hack.  (Not applicable to
  -current, which has int size refcounts.)
  
  4.x uses char refcounts, which can be overflowed, causing neat panics.
  This patch works around the problem by hooking into every m_* function
  that increases the refcount and doing two things:
  
  1.  Panicing if the refcount went negative (perhaps due to some external
  function messing with the refcount.)
  
  2.  Making a full copy of the resulting chain in order to keep the
  refcount under a reasonable threshold if necessary.
  
  The kern.ipc.m_clreflimithits sysctl has been made available so that
  the number of times a copy had to be performed can be monitored.  Luckily,
  this should not be a common occurance.
  
  Revision   Changes    Path
  1.51.2.29  +43 -0     src/sys/kern/uipc_mbuf.c


More information about the cvs-src mailing list