Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 2009 18:39:13 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Alexej Sokolov <bsd.quest@googlemail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: panic by unlocking of mutex in KLD
Message-ID:  <20090112173913.GA2102@skucha>
In-Reply-To: <671bb5fc0901120819q65969961v723807bcb7ad5a96@mail.gmail.com>
References:  <20090112134726.GA2988@debian.samsung.router> <20090112141029.GA31108@skucha> <671bb5fc0901120819q65969961v723807bcb7ad5a96@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 12, 2009 at 05:19:56PM +0100, Alexej Sokolov wrote:
> 2009/1/12 Mateusz Guzik <mjguzik@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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090112173913.GA2102>