From nobody@FreeBSD.org  Thu Feb 15 22:15:59 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id F2A7437B491
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Feb 2001 22:15:33 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f1G6FX348807;
	Thu, 15 Feb 2001 22:15:33 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200102160615.f1G6FX348807@freefall.freebsd.org>
Date: Thu, 15 Feb 2001 22:15:33 -0800 (PST)
From: davidx@viasoft.com.cn
To: freebsd-gnats-submit@FreeBSD.org
Subject: kernel crash with kldload/kldunload md.ko
X-Send-Pr-Version: www-1.0

>Number:         25130
>Category:       kern
>Synopsis:       kernel crash with kldload/kldunload md.ko
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    dcs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 15 22:20:01 PST 2001
>Closed-Date:    Fri Nov 2 06:41:32 PST 2001
>Last-Modified:  Fri Nov 02 06:42:07 PST 2001
>Originator:     David Xu
>Release:        FreeBSD 4.2-RELEASE
>Organization:
viasoft
>Environment:
>Description:
when I kldload and kldunload malloc disk module md.ko, kernel crashed.
blah, blah, ....

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x4
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc01565cf
stack pointer           = 0x10:0xcc972ed8
frame pointer           = 0x10:0xcc972ed8
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         = 268(kldunload)
interrupt mask          = none
trap number             = 12
panic: page fault

syncing disks... 41 40 12 7 5
done
Uptime: 43s
Automatic reboot in 15 seconds - press a key on console to abort

>How-To-Repeat:
# kldload md
# kldunload md

blah, blah, ....
>Fix:


>Release-Note:
>Audit-Trail:

From: Kris Kennaway <kris@obsecurity.org>
To: davidx@viasoft.com.cn
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/25130: kernel crash with kldload/kldunload md.ko
Date: Tue, 20 Feb 2001 03:10:34 -0800

 --C7zPtVaVf+AK4Oqc
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Thu, Feb 15, 2001 at 10:15:33PM -0800, davidx@viasoft.com.cn wrote:
 
 > >Originator:     David Xu
 > >Release:        FreeBSD 4.2-RELEASE
 
                    ^^^^^^^^^^^^^^^^^^^
 
 > when I kldload and kldunload malloc disk module md.ko, kernel crashed.
 > blah, blah, ....
 
 md(4) isn't in 4.x.  If you're trying to kldload a module built under
 -current in 4.x, it won't work.  Is this the case?
 
 Kris
 
 --C7zPtVaVf+AK4Oqc
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.4 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE6klCpWry0BWjoQKURApZzAKCGlfc9z63UtlF/HwaJKRRcOffUOACgquyB
 TOdmOanZK3RyZhDaKFjcivM=
 =mGKn
 -----END PGP SIGNATURE-----
 
 --C7zPtVaVf+AK4Oqc--
Responsible-Changed-From-To: freebsd-bugs->dcs 
Responsible-Changed-By: dcs 
Responsible-Changed-When: Thu Feb 22 01:41:01 PST 2001 
Responsible-Changed-Why:  
I'm working on it right now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25130 
State-Changed-From-To: open->feedback 
State-Changed-By: dcs 
State-Changed-When: Sat Feb 24 08:46:22 PST 2001 
State-Changed-Why:  
Patches have been committed. If no further problems are detected, 
I'm going to close this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25130 

From: David Xu <davidx@viasoft.com.cn>
To: Brad Laue <brad@towardex.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re[2]: kern/25130: kernel crash with kldload/kldunload md.ko
Date: Mon, 5 Mar 2001 12:22:14 +0800

 Hello Brad,
 
 Monday, March 05, 2001, 3:42:24 AM, you wrote:
 
 BL>  > >Originator:     David Xu
 BL>  > >Release:        FreeBSD 4.2-RELEASE
  
 BL>                     ^^^^^^^^^^^^^^^^^^^
  
 BL>  > when I kldload and kldunload malloc disk module md.ko, kernel crashed.
 BL>  > blah, blah, ....
 
 BL> You have the following in your kernel config file - it is enabled in the GENERIC kernel
 BL> by default, and is easily missed:
 
 BL> pseudo-device md                # Memory "disks"
 
 BL> I was able to reproduce the kernel panic with that option enabled in the config file.
 BL> The kernel bails out for obvious reasons; removing this option enables safe loading and
 BL> unloading of this module.
 
 BL> What is needed is a safety against loading a kernel module with code which already exists
 BL> in the BSD kernel itself; I've seen similar issues where modules are not prevented from 
 BL> loading, particularly in my PPPoE setup (ng_pppoe.ko).
 
 BL> Cheers,
 BL> Brad
 
 Yeah, you are genius.
 
 -- 
 Best regards,
  David Xu                           mailto:davidx@viasoft.com.cn
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: dwmalone 
State-Changed-When: Fri Nov 2 06:41:32 PST 2001 
State-Changed-Why:  
Remaining issues are a duplicate of PR 24392. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=25130 
>Unformatted:
