kldunload if_sk -> LOR & panic

Bjoern A. Zeeb bzeeb-lists at lists.zabbadoz.net
Sun Jul 18 08:20:11 PDT 2004


Hi,

tried to unload if_sk for testing the newly built module with dwhite's
locking patch (will be loaded after reset now :( ).
resulted in this on my amd64:

--- cut ---
noc# kldunload if_sk
e1000phy0: detached
miibus0: detached
lock order reversal
 1st 0xffffff0030ac7870 skc0 (network driver) @ sys/pci/if_sk.c:2604
 2nd 0xffffff0000b91af0 radix node head (radix node head) @ sys/netinet/in_rmx.c:391
Stack backtrace:
witness_checkorder() at witness_checkorder+0x4a6
_mtx_lock_flags() at _mtx_lock_flags+0x39
in_ifadown() at in_ifadown+0x5b
in_control() at in_control+0x81c
if_detach() at if_detach+0x50b
ether_ifdetach() at ether_ifdetach+0x25
sk_detach() at sk_detach+0x6d
(null)() at 0
null_method() at null_method


Fatal trap 9: general protection fault while in kernel mode
cpuid = 0; apic id = 00
instruction pointer     = 0x8:0xffffffff802450c6
stack pointer           = 0x10:0xffffffffa7c1c9b0
frame pointer           = 0x10:0xffffffffa7c1c9d0
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 1897 (kldunload)
kernel: type 9 trap, code=0
Stopped at      device_delete_child+0xa:        decl    %eax
db> where
device_delete_child() at device_delete_child+0xa
device_delete_child() at device_delete_child+0x20
sk_detach() at sk_detach+0x89
(null)() at 0
null_method() at null_method
--- cut ---

kernel is from Sat Jul 10 20:16:23 UTC 2004 thus before MOD_QUIESCE
etc.

--- cut ---
bz at noc:/usr/obj/u1/src/HEAD/src/sys/AMD64-20040710-01> nm kernel.debug | grep ffffffff802450
ffffffff80245010 T device_add_child
ffffffff80245024 T device_add_child_ordered
ffffffff802450bc T device_delete_child
bz at noc:/usr/obj/u1/src/HEAD/src/sys/AMD64-20040710-01> addr2line -e kernel.debug 0xffffffff802450c6
/u1/src/HEAD/src/sys/kern/subr_bus.c:1222
bz at noc:/usr/obj/u1/src/HEAD/src/sys/AMD64-20040710-01> head -n 1230 /u1/src/HEAD/src/sys/kern/subr_bus.c | tail -18
int
device_delete_child(device_t dev, device_t child)
{
        int error;
        device_t grandchild;

        PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev)));

        /* remove children first */
        while ( (grandchild = TAILQ_FIRST(&child->children)) ) {
                error = device_delete_child(child, grandchild);
                if (error)
                        return (error);
        }

        if ((error = device_detach(child)) != 0)
                return (error);
        if (child->devclass)
--- cut ---

-- 
Greetings

Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT


More information about the freebsd-amd64 mailing list