diff options
| author | 2012-06-16 11:47:24 +0000 | |
|---|---|---|
| committer | 2012-06-16 11:47:24 +0000 | |
| commit | f87ca809be86baf8af181874631b7ba56962ad17 (patch) | |
| tree | 5b5a14acd94d8cd6c6d1dc45254efdc8fec6d108 /sys/compat/linux/linux_futex.c | |
| parent | Protect against fd exhaustion when reopening database files. Only accept (diff) | |
| download | wireguard-openbsd-f87ca809be86baf8af181874631b7ba56962ad17.tar.xz wireguard-openbsd-f87ca809be86baf8af181874631b7ba56962ad17.zip | |
compat_linux: Don't hold the lock while pool_get'ing with WAITOK.
Okay jasper@.
Diffstat (limited to 'sys/compat/linux/linux_futex.c')
| -rw-r--r-- | sys/compat/linux/linux_futex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 2db9e5cdfdd..20a9b224d5f 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.1 2011/09/18 02:23:18 pirofti Exp $ */ +/* $OpenBSD: linux_futex.c,v 1.2 2012/06/16 11:47:24 pirofti Exp $ */ /* $NetBSD: linux_futex.c,v 1.26 2010/07/07 01:30:35 chs Exp $ */ /*- @@ -203,7 +203,9 @@ linux_do_futex(struct proc *p, const struct linux_sys_futex_args *uap, 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); |
