From owner-cvs-all Mon Apr 9 16:11:30 2001 Delivered-To: cvs-all@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 7BF9A37B422; Mon, 9 Apr 2001 16:11:25 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f39NAEG32445; Mon, 9 Apr 2001 16:10:14 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200104092234.f39MY6C59104@freefall.freebsd.org> Date: Mon, 09 Apr 2001 16:10:48 -0700 (PDT) From: John Baldwin To: John Baldwin Subject: RE: cvs commit: src/sys/kern subr_witness.c Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 09-Apr-01 John Baldwin wrote: > jhb 2001/04/09 15:34:06 PDT > > Modified files: > sys/kern subr_witness.c > Log: > Maintain a reference count on the witness struct. When the reference > count drops to 0 in witness_destroy, set the w_name and w_file pointers > to point to the string "(dead)" and the w_line field to 0. This way, > if a mutex of a given name is used only in a module, then as long as > all mutexes in the module are destroyed when the module is unloaded, > witness will not maintain stale references to the mutex's name in the > module's data section causing a panic later on when the w_name or w_file > field's are examined. The longer fix is to actually remove the witness structure in question from the tree, but this will work as a stop gap solution until I can get around to the longer variant. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message