panic by unlocking of mutex in KLD
Mateusz Guzik
mjguzik at gmail.com
Mon Jan 12 09:39:26 PST 2009
On Mon, Jan 12, 2009 at 05:19:56PM +0100, Alexej Sokolov wrote:
> 2009/1/12 Mateusz Guzik <mjguzik at gmail.com>
> > Mutexes have owners. It panics on loading because processes cannot
> > return to userland with locks held.
>
> i am not sure about it. Some time ago i implemented a charecter device with
> two syscalls: write, read. "write" lock the mutex and "read" unlock it. The
> user space programm opens device, then mekes "write" (mutex will held in
> kernel), goes back to user space, then makes "read" (mutex will unlocked in
> kernel) and it all run without panic. If needed i can post the source code.
>
Do you have kernel compiled with WITNESS? At least on -CURRENT the
kernel panicked like this (while loading your module):
System call kldload returning with 1 locks held
--
Mateusz Guzik <mjguzik at gmail.com>
More information about the freebsd-hackers
mailing list