From owner-cvs-all Sat Apr 29 6:24:39 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 8FCDE37B769; Sat, 29 Apr 2000 06:24:37 -0700 (PDT) (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA66509; Sat, 29 Apr 2000 06:24:36 -0700 (PDT) (envelope-from peter@FreeBSD.org) Message-Id: <200004291324.GAA66509@freefall.freebsd.org> From: Peter Wemm Date: Sat, 29 Apr 2000 06:24:36 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern subr_bus.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG peter 2000/04/29 06:24:36 PDT Modified files: sys/kern subr_bus.c Log: The newer module dependency code exposes an apparent bug in the bus/driver/kobj system. I am not 100% sure that this is the correct fix, but it is harmless and does seem to solve the problem. At worst, it could cause a tiny memory leak at unload time - this is better than a free(NULL) and subsequent panic. I'm waiting for comments from Doug about this. This may yet be backed out and fixed differently. The change itself is to increment the reference count on drivers in one case where it appears to have been missed. When everything is unloaded, kobj_class_free() was being called twice in some cases, and panicing the second time. Revision Changes Path 1.61 +2 -1 src/sys/kern/subr_bus.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message