From owner-freebsd-current@FreeBSD.ORG Tue May 13 09:12:50 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A963C37B401; Tue, 13 May 2003 09:12:50 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 606AB43F3F; Tue, 13 May 2003 09:12:49 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h4DGCeOn081911; Tue, 13 May 2003 12:12:41 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h4DGCesn081908; Tue, 13 May 2003 12:12:40 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 13 May 2003 12:12:40 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Dag-Erling Smorgrav In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: mux@FreeBSD.org cc: re@FreeBSD.org cc: current@FreeBSD.org Subject: Re: 5.1-RELEASE TODO X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 16:12:51 -0000 On Tue, 13 May 2003, Dag-Erling Smorgrav wrote: > Robert Watson writes: > > |-----------------+-------------+-------------+--------------------------| > > | Panic on | | | If a network device | > > | load/unload a | | | driver, possibly any | > > | kernel module | | | driver, is linked into | > > | for a driver | Patch | Maxime | the kernel and then | > > | already | submitted | Henrion | loaded and unloaded as a | > > | statically | | | module, the kernel will | > > | linked into the | | | panic. This has been | > > | kernel. | | | observed with both if_dc | > > | | | | and if_fxp. | > > |-----------------+-------------+-------------+--------------------------| > > I'm unable to reproduce this; kldload refuses to load a module which is > already present, and if you try to preload a driver which is compiled > into the kernel, the kernel will refuse to register it. > > There have been problems with unloading network drivers (due to > interrupts being delivered to a handler which had disappeared into thin > air) but these had nothing to do with whether the driver was already > compiled-in, and I believe they were fixed about a month ago. The case I was bumping into was: link the driver into the kernel at compile-time, then load the kld at runtime, then unload the kld. I believe mux has patches in hand that were submitted, and just needs to review, test, and merge :-). crash2# kldload if_fxp module_register: module pci/fxp already exists! Module pci/fxp failed to register: 17 module_register: module cardbus/fxp already exists! Module cardbus/fxp failed to register: 17 module_register: module fxp/miibus already exists! Module fxp/miibus failed to register: 17 can't re-use a leaf (fxp_rnr)! can't re-use a leaf (fxp_noflow)! crash2# kldunload if_fxp Fatal trap 12: page fault while in kernel mode fault virtual address = 0x4 fault code = supervisor read, page not present instruction pointer = 0x8:0xc03131f3 stack pointer = 0x10:0xc91e5c70 frame pointer = 0x10:0xc91e5c70 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 661 (kldunload) kernel: type 12 trap, code=0 Stopped at sysctl_unregister_oid+0x23: cmpl %ecx,0x4(%edx) db>