Module Name:    src
Committed By:   pooka
Date:           Thu Jul 22 21:00:07 UTC 2010

Modified Files:
        src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
Reset l_mutex when waking up a thread.  select uses it to determine
if a thread is still selecting, and would get a KASSERT panic if
the thread had been woken up but not run yet when selnotify() was
called.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/sleepq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/sleepq.c
diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.6 src/sys/rump/librump/rumpkern/sleepq.c:1.7
--- src/sys/rump/librump/rumpkern/sleepq.c:1.6	Tue Nov 17 15:23:42 2009
+++ src/sys/rump/librump/rumpkern/sleepq.c	Thu Jul 22 21:00:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.c,v 1.6 2009/11/17 15:23:42 pooka Exp $	*/
+/*	$NetBSD: sleepq.c,v 1.7 2010/07/22 21:00:07 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.6 2009/11/17 15:23:42 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.7 2010/07/22 21:00:07 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/condvar.h>
@@ -112,6 +112,7 @@
 		if (l->l_wchan == wchan) {
 			found = true;
 			l->l_wchan = NULL;
+			l->l_mutex = NULL;
 			TAILQ_REMOVE(sq, l, l_sleepchain);
 		}
 	}
@@ -127,6 +128,7 @@
 {
 
 	l->l_wchan = NULL;
+	l->l_mutex = NULL;
 	TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain);
 	cv_broadcast(&sq_cv);
 

Reply via email to