From owner-cvs-src@FreeBSD.ORG Sun Jul 20 20:12:07 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 678AF37B401; Sun, 20 Jul 2003 20:12:07 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5EF043FAF; Sun, 20 Jul 2003 20:12:06 -0700 (PDT) (envelope-from silby@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6L3C60U082888; Sun, 20 Jul 2003 20:12:06 -0700 (PDT) (envelope-from silby@repoman.freebsd.org) Received: (from silby@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6L3C6MA082887; Sun, 20 Jul 2003 20:12:06 -0700 (PDT) Message-Id: <200307210312.h6L3C6MA082887@repoman.freebsd.org> From: Mike Silbersack Date: Sun, 20 Jul 2003 20:12:06 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_4 Subject: cvs commit: src/sys/kern uipc_mbuf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 03:12:07 -0000 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