Try to sleep on the actual data address and not on the stack address of
the pointer to the data. Avoids eternal sleep.
Okay?
Index: linux_futex.c
===================================================================
RCS file: /cvs/src/sys/compat/linux/linux_futex.c,v
retrieving revision 1.4
diff -u -p -r1.4 linux_futex.c
--- linux_futex.c 19 Jun 2012 08:50:59 -0000 1.4
+++ linux_futex.c 19 Jun 2012 09:03:44 -0000
@@ -474,7 +474,7 @@ futex_sleep(struct futex **fp, struct pr
requeue:
TAILQ_INSERT_TAIL(&f->f_waiting_proc, wp, wp_list);
- ret = msleep(&f, &futex_lock, PUSER | PCATCH, "futex_sleep", timeout);
+ ret = msleep(f, &futex_lock, PUSER | PCATCH, "futex_sleep", timeout);
TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
@@ -508,7 +508,7 @@ futex_wake(struct futex *f, int n, struc
* note that sleeping threads are not in the process of requeueing.
*/
if (!TAILQ_EMPTY(&f->f_waiting_proc))
- wakeup(&f); /* only call wakeup once */
+ wakeup(f); /* only call wakeup once */
TAILQ_FOREACH(wp, &f->f_waiting_proc, wp_list) {
KASSERT(wp->wp_new_futex == NULL);