From owner-freebsd-questions@FreeBSD.ORG Fri Nov 5 05:38:36 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD852106564A for ; Fri, 5 Nov 2010 05:38:36 +0000 (UTC) (envelope-from cyberleo@cyberleo.net) Received: from paka.cyberleo.net (paka.cyberleo.net [66.219.31.21]) by mx1.freebsd.org (Postfix) with ESMTP id 79A068FC08 for ; Fri, 5 Nov 2010 05:38:36 +0000 (UTC) Received: from [172.16.44.4] (den.cyberleo.net [66.253.36.39]) by paka.cyberleo.net (Postfix) with ESMTPSA id 5F66F28405; Fri, 5 Nov 2010 01:38:35 -0400 (EDT) Message-ID: <4CD3985A.4090803@cyberleo.net> Date: Fri, 05 Nov 2010 00:38:34 -0500 From: CyberLeo Kitsana User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100911 Lightning/1.0b3pre Thunderbird/3.1.3 MIME-Version: 1.0 To: Alexander Best References: <20101103223438.GA26003@freebsd.org> In-Reply-To: <20101103223438.GA26003@freebsd.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: kldunload(8) returns 0, although it fail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2010 05:38:36 -0000 On 11/03/2010 05:34 PM, Alexander Best wrote: > hi there, > > is this a known issue with kldunload(8)? > > ***beginn*** > otaku% kldunload sound > otaku% echo $? > 0 > otaku% kldstat > Id Refs Address Size Name > 1 35 0xffffffff80100000 a2da40 kernel > 2 1 0xffffffff80b2e000 295e8 snd_hda.ko > 3 1 0xffffffff80b58000 85110 sound.ko > 4 1 0xffffffff80bde000 da4bb8 nvidia.ko > 5 4 0xffffffff81983000 418e0 linux.ko > 6 1 0xffffffff819c5000 80e8 ng_ubt.ko > 7 2 0xffffffff819ce000 fa78 ng_hci.ko > 8 2 0xffffffff819de000 2bd0 ng_bluetooth.ko > 9 3 0xffffffff819e1000 15e68 netgraph.ko > 10 1 0xffffffff81c12000 3edb linprocfs.ko > 11 3 0xffffffff81c16000 4698 pseudofs.ko > 12 1 0xffffffff81c1b000 31b3 procfs.ko > 13 1 0xffffffff81c1f000 a37 linsysfs.ko > otaku% kldunload sound > kldunload: attempt to unload file that was loaded by the kernel > kldunload: can't unload file: Device busy sound.ko was presumably loaded by snd_hda.ko, as it is a dependency. You must unload all the modules depending on sound.ko before it will unload. At that point, I believe I've seen it unload itself. Same with netgraph.ko, and the modules that require it (ng_*.ko). -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net Furry Peace! - http://wwww.fur.com/peace/