Subject: wi panics in uvm_unmap: no context ?
To: None <tech-kern@netbsd.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 03/18/2004 20:53:59
It does no harm to call wi_stop(, 1) from wi_ioctl, wi_detach, wi_power,
or wi_shutdown. I have an experimental patch that calls wi_stop(, 1)
from wi_watchdog. That panics the computer (see below). Why?
Apparently lockmgr is dealing with a non-LK_SPIN type lock, so it wants
curlwp != NULL. So why haven't I seen this before? Does the kernel only
call wi_detach, wi_power, and wi_shutdown with a process context?
Thanks to both Bryan Cribbs and Simon Burge for bringing this to my
attention.
Dave
***
panic: lockmgr: no context
Begin traceback...
lockmgr(c03f25c4,10022,c03f2668,c96b9000,c0423840) at netbsd:lockmgr+0xca
uvm_unmap(c03f25c0,c96b8000,c96b9000,c04e7000,c0c5f034) at netbsd:uvm_unmap+0x6c
_x86_memio_unmap(1,c96b8000,1000,c0482d24,0) at netbsd:_x86_memio_unmap+0xb2
rbus_space_free(c0c0adc0,c96b8000,1000,0,c0c12800) at netbsd:rbus_space_free+0x49
pccbb_pcmcia_mem_free(c0c0f4e8,c0c3622c,c0482d84,c030efc7,c0c36200) at netbsd:pccbb_pcmcia_mem_free+0x1e
pcmcia_function_disable(c0c36200,c0c5fe6c,c0c5fe6c,c0c61154,c0482dc4) at netbsd:pcmcia_function_disable+0x7c
wi_stop(c0c5f034,1,c0482de4,0,c01b7dec) at netbsd:wi_stop+0x15d
wi_watchdog(c0c5f034,14,c02353ec,0,0) at netbsd:wi_watchdog+0x121
if_slowtimo(0,c0482e40,c0c0ab60,0,c0482e6c) at netbsd:if_slowtimo+0x96
softclock(0,c0482e60,c02d61e5,c0482e6c,0) at netbsd:softclock+0x259
softintr_dispatch(0,87e90010,10030,20a40010,10) at netbsd:softintr_dispatch+0x73
Xsoftclock() at netbsd:Xsoftclock+0x25
--- interrupt ---
cpu_switch(c041cd20,0,8,246,c93c7000) at netbsd:cpu_switch+0xca
ltsleep(c041cb80,4,c039e561,0,0) at netbsd:ltsleep+0x393
uvm_scheduler(c041cb60,0,c0421a3c,c038a565,0) at netbsd:uvm_scheduler+0x10f
main(0,0,0,0,0) at netbsd:main+0x697
End traceback...
dumping to dev 0,1 offset 263799
dump 383 ... succeeded
panic: pccbb_intr_disestablish: cbb1 cannot find pil 0xc0b4ffc0
Begin traceback...
pccbb_make_tag(c0c0f400,c0b4ffc0,c0482ba4,c0174c93,5) at netbsd:pccbb_make_tag
pcmcia_intr_disestablish(c0c36200,c0b4ffc0,c0c5fda4,c0c5f000,c0c5f000) at netbsd:pcmcia_intr_disestablish+0x1b1
wi_pcmcia_disable(c0c5f000,c0c5fe6c,c0c5fe6c,c0c61154,1000) at netbsd:wi_pcmcia_disable+0x1b
wi_stop(c0c5f034,1,17ff0000,c02b68b0,1002f0) at netbsd:wi_stop+0x15d
wi_shutdown(c0c5f000,0,0,100,100) at netbsd:wi_shutdown+0x23
doshutdownhooks(c038af63,0,c0482c64,c0224f68,100) at netbsd:doshutdownhooks+0x2a
cpu_reboot(100,0,c0482c64,c02daaaf,c0424620) at netbsd:cpu_reboot+0x57
panic(c038af63,c0ae91e0,c0482ca4,c02a2b86,c0423620) at netbsd:panic+0x108
lockmgr(c03f25c4,10022,c03f2668,c96b9000,c0423840) at netbsd:lockmgr+0xca
uvm_unmap(c03f25c0,c96b8000,c96b9000,c04e7000,c0c5f034) at netbsd:uvm_unmap+0x6c
_x86_memio_unmap(1,c96b8000,1000,c0482d24,0) at netbsd:_x86_memio_unmap+0xb2
rbus_space_free(c0c0adc0,c96b8000,1000,0,c0c12800) at netbsd:rbus_space_free+0x49
pccbb_pcmcia_mem_free(c0c0f4e8,c0c3622c,c0482d84,c030efc7,c0c36200) at netbsd:pccbb_pcmcia_mem_free+0x1e
pcmcia_function_disable(c0c36200,c0c5fe6c,c0c5fe6c,c0c61154,c0482dc4) at netbsd:pcmcia_function_disable+0x7c
wi_stop(c0c5f034,1,c0482de4,0,c01b7dec) at netbsd:wi_stop+0x15d
wi_watchdog(c0c5f034,14,c02353ec,0,0) at netbsd:wi_watchdog+0x121
if_slowtimo(0,c0482e40,c0c0ab60,0,c0482e6c) at netbsd:if_slowtimo+0x96
softclock(0,c0482e60,c02d61e5,c0482e6c,0) at netbsd:softclock+0x259
softintr_dispatch(0,87e90010,10030,20a40010,10) at netbsd:softintr_dispatch+0x73
Xsoftclock() at netbsd:Xsoftclock+0x25
--- interrupt ---
cpu_switch(c041cd20,0,8,246,c93c7000) at netbsd:cpu_switch+0xca
ltsleep(c041cb80,4,c039e561,0,0) at netbsd:ltsleep+0x393
uvm_scheduler(c041cb60,0,c0421a3c,c038a565,0) at netbsd:uvm_scheduler+0x10f
main(0,0,0,0,0) at netbsd:main+0x697
End traceback...
dumping to dev 0,1 offset 263799
dump 383 ... succeeded
rebooting...
--
David Young OJC Technologies
dyoung@ojctech.com Urbana, IL * (217) 278-3933