LORs during module unload

From: Jason Harmening <jason.harmening_at_gmail.com>
Date: Sat, 8 Aug 2009 10:46:01 -0500
Hi all,

When testing my kernel module against a kernel built yesterday, I
noticed the following LORs when unloading the top-level module (which
also automatically unloaded some dependency modules):

lock order reversal:
 1st 0xffffffff807af4a0 module subsystem sx lock (module subsystem sx
lock) _at_ /usr/src/sys/kern/kern_linker.c:602
 2nd 0xffffffff807d0900 newbus (newbus) _at_ /usr/src/sys/kern/subr_bus.c:4127
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
kdb_backtrace() at kdb_backtrace+0x32
_witness_debugger() at _witness_debugger+0x1e
witness_checkorder() at witness_checkorder+0x8c7
_sx_xlock() at _sx_xlock+0x74
driver_module_handler() at driver_module_handler+0x49
module_quiesce() at module_quiesce+0x38
linker_file_unload() at linker_file_unload+0x98
kern_kldunload() at kern_kldunload+0xdf
kldunloadf() at kldunloadf+0x1a
syscall() at syscall+0x2e9
Xfast_syscall() at Xfast_syscall+0xe1
--- syscall (444, FreeBSD ELF64, kldunloadf), rip = 0x8006989fc, rsp =
0x7fffffffe2c8, rbp = 0x2 ---
lock order reversal:
 1st 0xffffffff807ae8c0 kernel linker (kernel linker) _at_
/usr/src/sys/kern/kern_linker.c:1068
 2nd 0xffffffff807d0900 newbus (newbus) _at_ /usr/src/sys/kern/subr_bus.c:4127
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
kdb_backtrace() at kdb_backtrace+0x32
_witness_debugger() at _witness_debugger+0x1e
witness_checkorder() at witness_checkorder+0x8c7
_sx_xlock() at _sx_xlock+0x74
driver_module_handler() at driver_module_handler+0x49
module_unload() at module_unload+0x38
linker_file_unload() at linker_file_unload+0x13a
kern_kldunload() at kern_kldunload+0xdf
kldunloadf() at kldunloadf+0x1a
syscall() at syscall+0x2e9
Xfast_syscall() at Xfast_syscall+0xe1
--- syscall (444, FreeBSD ELF64, kldunloadf), rip = 0x8006989fc, rsp =
0x7fffffffe2c8, rbp = 0x2 ---
iicbus2: detached
lock order reversal:
 1st 0xffffffff807ae8c0 kernel linker (kernel linker) _at_
/usr/src/sys/kern/kern_linker.c:1068
 2nd 0xffffffff807b0ec0 sysctl lock (sysctl lock) _at_
/usr/src/sys/kern/kern_sysctl.c:256
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
kdb_backtrace() at kdb_backtrace+0x32
_witness_debugger() at _witness_debugger+0x1e
witness_checkorder() at witness_checkorder+0x8c7
_sx_xlock() at _sx_xlock+0x74
sysctl_ctx_free() at sysctl_ctx_free+0x2d
device_sysctl_fini() at device_sysctl_fini+0x22
device_detach() at device_detach+0x1dd
cx88_i2c_destroy() at cx88_i2c_destroy+0x48
device_detach() at device_detach+0x8b
cx23885_teardown() at cx23885_teardown+0x7d
cx88_release_client() at cx88_release_client+0x86
cx88_common_detach() at cx88_common_detach+0x20
device_detach() at device_detach+0x8b
driver_module_handler() at driver_module_handler+0x395
module_unload() at module_unload+0x38
linker_file_unload() at linker_file_unload+0x13a
kern_kldunload() at kern_kldunload+0xdf
kldunloadf() at kldunloadf+0x1a
syscall() at syscall+0x2e9
Xfast_syscall() at Xfast_syscall+0xe1
--- syscall (444, FreeBSD ELF64, kldunloadf), rip = 0x8006989fc, rsp =
0x7fffffffe2c8, rbp = 0x2 ---

--Jason
Received on Sat Aug 08 2009 - 14:11:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:53 UTC