From owner-freebsd-current Sun May 14 5:49: 1 2000 Delivered-To: freebsd-current@freebsd.org Received: from mail11.svr.pol.co.uk (mail11.svr.pol.co.uk [195.92.193.23]) by hub.freebsd.org (Postfix) with ESMTP id E25DC37BBD3; Sun, 14 May 2000 05:48:49 -0700 (PDT) (envelope-from n_hibma@calcaphon.com) Received: from [195.92.67.23] (helo=mail18.svr.pol.co.uk) by mail11.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 12qxp4-0007dx-00; Sun, 14 May 2000 13:48:42 +0100 Received: from modem-123.porcupine-puffer.dialup.pol.co.uk ([62.137.50.251] helo=henny.webweaving.org) by mail18.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 12qxp1-000670-00; Sun, 14 May 2000 13:48:40 +0100 Received: from localhost (localhost [127.0.0.1]) by henny.webweaving.org (8.9.3/8.9.3) with ESMTP id NAA78642; Sun, 14 May 2000 13:33:14 +0100 (BST) (envelope-from n_hibma@calcaphon.com) Date: Sun, 14 May 2000 13:33:14 +0100 (BST) From: Nick Hibma X-Sender: n_hibma@localhost Reply-To: Nick Hibma To: phk@freebsd.org Cc: Peter Edwards , FreeBSD CURRENT Mailing List , wc.bulte@chello.nl, Maxim Sobolev Subject: Re: vn.ko load/unload/mount = panic In-Reply-To: <39097C24.55671DBE@openet-telecom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Correct me if I am wrong, but I don't think you actually have to disassociate any dev_t's from the driver (by clearing the si_drv[12] fields) because we call destroy_dev and cdevsw_remove, so any later uses of dev_t's get an error because the device has gone away. Apart from that I don't think we the calls to cdevsw_add/_destroy in the first place, because we create the cdevsw on demand (with make_dev). Poul, is this correct? nick On Fri, 28 Apr 2000, Peter Edwards wrote: > I had a longer look at this, and a more complete patch is logged as PR > kern/18270 (try at your own risk: it works for me). > I'd appreciate someone more experienced having a look at it and > commenting. > Cheers, > Peter. > > > Wilko Bulte wrote: > > > > On Wed, Apr 26, 2000 at 04:25:46PM +0100, Peter Edwards (local) wrote: > > > > How about send-pr ing this stuff? > > > > Wilko > > > > > Hi, > > > After a (very) quick look at the source it looks like there's a missing > > > cdevsw_remove() missing from the MOD_UNLOAD/MOD_SHUTDOWN event handling > > > I haven't time to test it, but try this: > > > > > > *** vn.c.old Wed Apr 26 16:23:03 2000 > > > --- vn.c Wed Apr 26 16:24:06 2000 > > > *************** > > > *** 762,767 **** > > > --- 762,768 ---- > > > case MOD_UNLOAD: > > > /* fall through */ > > > case MOD_SHUTDOWN: > > > + cdevsw_remove(&vn_cdevsw); > > > for (;;) { > > > vn = SLIST_FIRST(&vn_list); > > > if (!vn) > > > > > > > > > Maxim Sobolev wrote: > > > > > > > > Hi, > > > > > > > > I've already submitted this crash report earlier but it seems that developers > > > > in -current list are too busy discussing whether Matt allowed to commit his SMP > > > > work into 4.0 to pay attention to "ordinary" panic reports :-(. Following is > > > > slightly simplified course of actions which is known to produce kernel panic on > > > > both 4.0 and 5.0: > > > > > > > > root@notebook# kldstat > > > > Id Refs Address Size Name > > > > 1 2 0xc0100000 1c2f48 kernel > > > > 2 1 0xc02c3000 30c8 splash_bmp.ko > > > > root@notebook# mount /dev/vn0c /mnt > > > > mount: Device not configured > > > > root@notebook# kldload /modules/vn.ko > > > > root@notebook# kldstat > > > > Id Refs Address Size Name > > > > 1 3 0xc0100000 1c2f48 kernel > > > > 2 1 0xc02c3000 30c8 splash_bmp.ko > > > > 3 1 0xc0823000 3000 vn.ko > > > > root@notebook# kldunload -i 3 > > > > root@notebook# mount /dev/vn0c /mnt > > > > [BINGO] > > > > Fatal trap 12: page fault while in kernel mode > > > > [...] > > > > > > > > -Maxim > > > > -- > > Wilko Bulte Powered by FreeBSD http://www.freebsd.org > > http://www.tcja.nl > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-current" in the body of the message > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > -- n_hibma@webweaving.org n_hibma@freebsd.org USB project http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message