From owner-cvs-src@FreeBSD.ORG Mon May 17 14:24:40 2004 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 A001116A4CE; Mon, 17 May 2004 14:24:40 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FDEC43D39; Mon, 17 May 2004 14:24:40 -0700 (PDT) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i4HLOeGe074302; Mon, 17 May 2004 14:24:40 -0700 (PDT) (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i4HLOeTY074301; Mon, 17 May 2004 14:24:40 -0700 (PDT) (envelope-from peter) Message-Id: <200405172124.i4HLOeTY074301@repoman.freebsd.org> From: Peter Wemm Date: Mon, 17 May 2004 14:24:40 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_linker.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, 17 May 2004 21:24:40 -0000 peter 2004/05/17 14:24:40 PDT FreeBSD src repository Modified files: sys/kern kern_linker.c Log: Since we go to the trouble of compiling the kobj ops table for each class, and cannot handle it going away, add an explicit reference to the kobj class inside each linker class. Without this, a class with no modules loaded will sit with an idle refcount of 0. Loading and unloading a module with it causes a 0->1->0 transition which frees the ops table and causes subsequent loads using that class to explode. Normally, the "kernel" module will remain forever loaded and prevent this happening, but if you have more than one linker class active, only one owns the "kernel". This finishes making modules work for kldload(8) on amd64. Revision Changes Path 1.111 +1 -0 src/sys/kern/kern_linker.c