[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: compat linux futex locking problem
On Mon, Jun 02, 2008 at 10:07:55AM +0200, Nicolas Joly wrote:
> While testing some threaded apps under amd64 NTPL linux emulation, i
> discovered a locking problem with our futex implementation.
> In most cases, futex_get() is called from linux_sys_futex() without
> lock held, but there is one extra call in futex_wake() where the futex
> lock is already hold ... leading to a panic.
> I'm not sure about the correct way to fix it (i'm not a locking
> specialist) and wanted to ask.
> In the mean time, i checked the corresponding code in FreeBSD which
> added an extra argument to futex_get to record if the lock is already
> hold. But that does not seems right to me, especially because
> futex_get() can sleep for quite some time due to a call to
> kmem_zalloc(x, KM_SLEEP).
yes indeed... we use sleepable lock in the futex_get() so it's ok it
can sleep. We have some more fixes to the futexes you still have not
incorporated. I am sure you want to import those....
feel free to contact me in private to discuss those fixes
Main Index |
Thread Index |