Date: Sun, 20 Jul 2003 20:12:06 -0700 (PDT) From: Mike Silbersack <silby@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern uipc_mbuf.c Message-ID: <200307210312.h6L3C6MA082887@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307210312.h6L3C6MA082887>