The following diff fixes an assertwaitok() panic. Okay?

Index: linux_futex.c
===================================================================
RCS file: /cvs/src/sys/compat/linux/linux_futex.c,v
retrieving revision 1.1
diff -u -p -r1.1 linux_futex.c
--- linux_futex.c       18 Sep 2011 02:23:18 -0000      1.1
+++ linux_futex.c       15 Jun 2012 11:31:04 -0000
@@ -203,7 +203,9 @@ linux_do_futex(struct proc *p, const str
                if (SCARG(uap, timeout) != NULL && timeout_hz == 0)
                        timeout_hz = 1;
 
+               mtx_leave(&futex_lock);
                wp = pool_get(&futex_wp_pool, PR_WAITOK);
+               mtx_enter(&futex_lock);
 
                f = futex_get(SCARG(uap, uaddr));
                ret = futex_sleep(&f, p, timeout_hz, wp);

Reply via email to