summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/linux/linux_futex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c
index 04a37c51eaf..8442c6b63ef 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.11 2013/01/15 10:47:35 guenther Exp $ */
+/* $OpenBSD: linux_futex.c,v 1.12 2013/04/10 12:58:52 pirofti Exp $ */
/* $NetBSD: linux_futex.c,v 1.26 2010/07/07 01:30:35 chs Exp $ */
/*-
@@ -474,6 +474,7 @@ void
futex_put(struct futex *f)
{
MUTEX_ASSERT_LOCKED(&futex_lock);
+ KASSERT(f->f_refcount > 0);
f->f_refcount--;
if (f->f_refcount == 0) {
KASSERT(TAILQ_EMPTY(&f->f_waiting_proc));