Re: kldunload(8) returns 0, although it fail

2010-11-05 Thread Alexander Best
On Fri Nov  5 10, CyberLeo Kitsana wrote:
 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 AddressSize Name
   1   35 0x8010 a2da40   kernel
   21 0x80b2e000 295e8snd_hda.ko
   31 0x80b58000 85110sound.ko
   41 0x80bde000 da4bb8   nvidia.ko
   54 0x81983000 418e0linux.ko
   61 0x819c5000 80e8 ng_ubt.ko
   72 0x819ce000 fa78 ng_hci.ko
   82 0x819de000 2bd0 ng_bluetooth.ko
   93 0x819e1000 15e68netgraph.ko
  101 0x81c12000 3edb linprocfs.ko
  113 0x81c16000 4698 pseudofs.ko
  121 0x81c1b000 31b3 procfs.ko
  131 0x81c1f000 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).

thanks for your help. the issue is however not that i expect any of the modules
i tested to unload successfully. as you pointed out sound.ko and netgraph.ko
are being used so they cannot be unloaded.

however kldunload suceeds, atlthough it shouldn't. only the second time it is
being invoked it fails with EBUSY. it should also fail the first time.

cheers.
alex

 
 -- 
 Fuzzy love,
 -CyberLeo
 Technical Administrator
 CyberLeo.Net Webhosting
 http://www.CyberLeo.Net
 cyber...@cyberleo.net
 
 Furry Peace! - http://.fur.com/peace/

-- 
a13x
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: kldunload(8) returns 0, although it fail

2010-11-04 Thread Alexander Best
On Wed Nov  3 10, Alexander Best wrote:
 hi there,
 
 is this a known issue with kldunload(8)?

this is also very interesting:

***beginn***
otaku% kldstat -v|grep netgraph
 73 0x80bfa000 15e68netgraph.ko (/boot/kernel/netgraph.ko)
 6 netgraph
otaku% sudo kldunload netgraph
otaku% echo $?
0
otaku% kldstat -v|grep netgraph
 72 0x80bfa000 15e68netgraph.ko (/boot/kernel/netgraph.ko)
 6 netgraph
otaku% 
***end***

there seems to be a logical error in the ref counting code.

cheers.
alex

 
 ***beginn***
 otaku% kldunload sound
 otaku% echo $?
 0
 otaku% kldstat
 Id Refs AddressSize Name
  1   35 0x8010 a2da40   kernel
  21 0x80b2e000 295e8snd_hda.ko
  31 0x80b58000 85110sound.ko
  41 0x80bde000 da4bb8   nvidia.ko
  54 0x81983000 418e0linux.ko
  61 0x819c5000 80e8 ng_ubt.ko
  72 0x819ce000 fa78 ng_hci.ko
  82 0x819de000 2bd0 ng_bluetooth.ko
  93 0x819e1000 15e68netgraph.ko
 101 0x81c12000 3edb linprocfs.ko
 113 0x81c16000 4698 pseudofs.ko
 121 0x81c1b000 31b3 procfs.ko
 131 0x81c1f000 a37  linsysfs.ko
 otaku% kldunload sound
 kldunload: attempt to unload file that was loaded by the kernel
 kldunload: can't unload file: Device busy
 otaku% echo $?
 1
 otaku%
 ***end***
 
 cheers.
 alex
 
 -- 
 a13x

-- 
a13x
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: kldunload(8) returns 0, although it fail

2010-11-04 Thread CyberLeo Kitsana
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 AddressSize Name
  1   35 0x8010 a2da40   kernel
  21 0x80b2e000 295e8snd_hda.ko
  31 0x80b58000 85110sound.ko
  41 0x80bde000 da4bb8   nvidia.ko
  54 0x81983000 418e0linux.ko
  61 0x819c5000 80e8 ng_ubt.ko
  72 0x819ce000 fa78 ng_hci.ko
  82 0x819de000 2bd0 ng_bluetooth.ko
  93 0x819e1000 15e68netgraph.ko
 101 0x81c12000 3edb linprocfs.ko
 113 0x81c16000 4698 pseudofs.ko
 121 0x81c1b000 31b3 procfs.ko
 131 0x81c1f000 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
cyber...@cyberleo.net

Furry Peace! - http://.fur.com/peace/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


kldunload(8) returns 0, although it fail

2010-11-03 Thread Alexander Best
hi there,

is this a known issue with kldunload(8)?

***beginn***
otaku% kldunload sound
otaku% echo $?
0
otaku% kldstat
Id Refs AddressSize Name
 1   35 0x8010 a2da40   kernel
 21 0x80b2e000 295e8snd_hda.ko
 31 0x80b58000 85110sound.ko
 41 0x80bde000 da4bb8   nvidia.ko
 54 0x81983000 418e0linux.ko
 61 0x819c5000 80e8 ng_ubt.ko
 72 0x819ce000 fa78 ng_hci.ko
 82 0x819de000 2bd0 ng_bluetooth.ko
 93 0x819e1000 15e68netgraph.ko
101 0x81c12000 3edb linprocfs.ko
113 0x81c16000 4698 pseudofs.ko
121 0x81c1b000 31b3 procfs.ko
131 0x81c1f000 a37  linsysfs.ko
otaku% kldunload sound
kldunload: attempt to unload file that was loaded by the kernel
kldunload: can't unload file: Device busy
otaku% echo $?
1
otaku%
***end***

cheers.
alex

-- 
a13x
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org