From mi@symbion.zaytman.com  Sat May 21 17:50:57 2005
Return-Path: <mi@symbion.zaytman.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6E25516A4CE
	for <freebsd-gnats-submit@freebsd.org>; Sat, 21 May 2005 17:50:57 +0000 (GMT)
Received: from smtp04.mrf.mail.rcn.net (smtp04.mrf.mail.rcn.net [207.172.4.63])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 83BD643D9B
	for <freebsd-gnats-submit@freebsd.org>; Sat, 21 May 2005 17:50:56 +0000 (GMT)
	(envelope-from mi@symbion.zaytman.com)
Received: from 207-172-77-9.c3-0.sbo-ubr1.sbo-ubr.ma.cable.rcn.com (HELO symbion.zaytman.com) (207.172.77.9)
  by smtp04.mrf.mail.rcn.net with ESMTP; 21 May 2005 13:50:55 -0400
Received: from symbion.zaytman.com (localhost [127.0.0.1])
	by symbion.zaytman.com (8.13.1/8.13.1) with ESMTP id j4LHotSH009226
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 May 2005 13:50:55 -0400 (EDT)
	(envelope-from mi@symbion.zaytman.com)
Received: (from root@localhost)
	by symbion.zaytman.com (8.13.1/8.13.1/Submit) id j4LHotgA009225;
	Sat, 21 May 2005 13:50:55 -0400 (EDT)
	(envelope-from mi)
Message-Id: <200505211750.j4LHotgA009225@symbion.zaytman.com>
Date: Sat, 21 May 2005 13:50:55 -0400 (EDT)
From: Mikhail Teterin <mi@aldan.algebra.com>
Reply-To: Mikhail Teterin <mi@aldan.algebra.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: wrong reaction to loading modules compiled into kernel
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         81344
>Category:       kern
>Synopsis:       wrong reaction to loading modules compiled into kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 21 18:00:16 GMT 2005
>Closed-Date:    Sat May 21 20:19:51 GMT 2005
>Last-Modified:  Sat May 21 20:40:02 GMT 2005
>Originator:     Mikhail Teterin
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
Virtual Estates, Inc.
>Environment:
System: FreeBSD symbion.zaytman.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Wed May 18 12:21:05 EDT 2005 mi@symbion.zaytman.com:/ibm/obj/opt/src/sys/TRISTAR i386

>Description:

	I forgot, I had the umass compiled into the kernel and tried
	to kldload the module after boot. Understandibly, it failed with:
		kldload: can't load umass: File exists
	on stderr, and the following kernel messages:
		module_register: module uhub/umass already exists!
		linker_file_sysinit "umass.ko" failed to register! 17

	however, the module is not listed in the kldstat output and
	can not be unloaded:
		kldunload: can't unload file: Device busy
	and the folloing kernel message:
		linkerunload: attempt to unload file that was loaded by the kernel

	I don't know if this problem is purely cosmetic or not.

>How-To-Repeat:

	See Description.

>Fix:
>Release-Note:
>Audit-Trail:

From: Pawel Malachowski <pawmal-posting@freebsd.lublin.pl>
To: Mikhail Teterin <mi@aldan.algebra.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/81344: wrong reaction to loading modules compiled into kernel
Date: Sat, 21 May 2005 20:14:55 +0200

 On Sat, May 21, 2005 at 01:50:55PM -0400, Mikhail Teterin wrote:
 
 > 	I forgot, I had the umass compiled into the kernel and tried
 > 	to kldload the module after boot. Understandibly, it failed with:
 > 		kldload: can't load umass: File exists
 > 	on stderr, and the following kernel messages:
 > 		module_register: module uhub/umass already exists!
 > 		linker_file_sysinit "umass.ko" failed to register! 17
 > 
 > 	however, the module is not listed in the kldstat output and
 
 see http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/48759
 
 > 	can not be unloaded:
 > 		kldunload: can't unload file: Device busy
 > 	and the folloing kernel message:
 > 		linkerunload: attempt to unload file that was loaded by the kernel
 > 
 > 	I don't know if this problem is purely cosmetic or not.
 
 
 -- 
 Pawe Maachowski
State-Changed-From-To: open->closed 
State-Changed-By: mi 
State-Changed-When: Sat May 21 20:18:24 GMT 2005 
State-Changed-Why:  
Duplicate of kern/48759 -- of 2003. 
Thanks to Pawel Malachowski for point it out. 

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

From: Mikhail Teterin <mi@corbulon.video-collage.com>
To: pawmal-posting@freebsd.lublin.pl (Pawel Malachowski)
Cc: FreeBSD-gnats-submit@freebsd.org, kris@freebsd.org,
	demon@freebsd.org
Subject: Re: kern/81344: wrong reaction to loading modules compiled into kernel
Date: Sat, 21 May 2005 16:29:46 -0400 (EDT)

 > On Sat, May 21, 2005 at 01:50:55PM -0400, Mikhail Teterin wrote:
 > 
 > > 	I forgot, I had the umass compiled into the kernel and tried
 > > 	to kldload the module after boot. Understandibly, it failed with:
 > > 		kldload: can't load umass: File exists
 > > 	on stderr, and the following kernel messages:
 > > 		module_register: module uhub/umass already exists!
 > > 		linker_file_sysinit "umass.ko" failed to register! 17
 > > 
 > > 	however, the module is not listed in the kldstat output and
 > 
 > see http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/48759
 
 Thanks, Pawel, I just closed my PR!
 
 I wonder, what prevents the fix in yours from getting into the tree...
 It's been over 2 years...
 
 	-mi
 
 > > 	can not be unloaded:
 > > 		kldunload: can't unload file: Device busy
 > > 	and the folloing kernel message:
 > > 		linkerunload: attempt to unload file that was loaded by the kernel
 > > 
 > > 	I don't know if this problem is purely cosmetic or not.
>Unformatted:
