diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2012-06-19 11:45:06 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2012-06-19 11:45:06 +0000 |
commit | d84071e0246a78a2caac70dc4c13f09c72229615 (patch) | |
tree | 5406ce8046719f53542414ce0607e11df1c6769e /sys/compat | |
parent | d6d059cffb85e03ac221c8143becb4c83367b40a (diff) |
Avoid eternal sleep.
Sleep on the actual data address and not on the stack address of
the pointer to the data.
Okay jasper@
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_futex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 7c2289dfbb7..17d79dde945 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_futex.c,v 1.6 2012/06/19 11:43:45 pirofti Exp $ */ +/* $OpenBSD: linux_futex.c,v 1.7 2012/06/19 11:45:05 pirofti Exp $ */ /* $NetBSD: linux_futex.c,v 1.26 2010/07/07 01:30:35 chs Exp $ */ /*- @@ -499,7 +499,7 @@ futex_sleep(struct futex **fp, struct proc *p, int timeout, 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); @@ -533,7 +533,7 @@ futex_wake(struct futex *f, int n, struct futex *newf, int n2) * 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); |