NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: kern/45705: KASSERT(KERNEL_LOCKED_P()) failed in src/sys/dev/usb/usbdi.c



> boot device: sd0
> root on sd0a dumps on sd0b
> panic: kernel diagnostic assertion "KERNEL_LOCKED_P()" failed: file 
> "/work/src/sys/dev/usb/usbdi.c", line 264 
> fatal breakpoint trap in supervisor mode
> trap type 1 code 0 eip c0269af4 cs 8 eflags 282 cr2 0 ilevel 0
> Stopped in pid 0.1 (system) at  netbsd:breakpoint+0x4:  popl    %ebp
> db{1}> tr
[ ... ]
> kern_assert(c0b5c0dc,c0b5c2ab,c0bfdafd,c0bfd808,108,c0e65a4c,0,0,0,1) at 
> netbsd:
> kern_assert+0x23
> usbd_transfer(c31e7200,c31eb280,cd855e04,cd855e3c,1f,0,3a98,c086cc5c,cd855e04,0)
>  at netbsd:usbd_transfer+0x1cf
[ ... ]
> sdopen(401,0,0,6000,0,0,0,ff800,0,e6b000) at netbsd:sdopen+0x162
> sdsize(401,0,9,0,c0bb7664,0,3,0,c0cc4580,e6b000) at netbsd:sdsize+0x107
> cpu_dumpconf(0,0,14,0,0,c04b72e0,0,0,c0cdb2a0,0) at netbsd:cpu_dumpconf+0x4d
> main(0,0,0,0,0,0,0,0,0,0) at netbsd:main+0x457
> db{1}> 

this will happen with usb disks only.

thanks to mlelstv for noticing what is wrong.  the problem is pretty
insidious.  almost every caller of ->d_psize() doesn't do the locking
properly, and there are several dozen callers, mostly the machdep
cpu_dumpconf() and dumpsys() functions.


.mrg.


Home | Main Index | Thread Index | Old Index