From owner-cvs-all Mon Apr 9 15:49:43 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9003637B42C; Mon, 9 Apr 2001 15:49:36 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f39MY6C59104; Mon, 9 Apr 2001 15:34:06 -0700 (PDT) (envelope-from jhb) Message-Id: <200104092234.f39MY6C59104@freefall.freebsd.org> From: John Baldwin Date: Mon, 9 Apr 2001 15:34:06 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern subr_witness.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. Revision Changes Path 1.63 +16 -1 src/sys/kern/subr_witness.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message