Module Name:    src
Committed By:   pooka
Date:           Tue Jun  9 23:26:19 UTC 2009

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

Log Message:
check that interlock isn't null before releasing it


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/librump/rumpkern/ltsleep.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/ltsleep.c
diff -u src/sys/rump/librump/rumpkern/ltsleep.c:1.13 src/sys/rump/librump/rumpkern/ltsleep.c:1.14
--- src/sys/rump/librump/rumpkern/ltsleep.c:1.13	Tue Jun  9 15:53:05 2009
+++ src/sys/rump/librump/rumpkern/ltsleep.c	Tue Jun  9 23:26:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ltsleep.c,v 1.13 2009/06/09 15:53:05 pooka Exp $	*/
+/*	$NetBSD: ltsleep.c,v 1.14 2009/06/09 23:26:19 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.13 2009/06/09 15:53:05 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.14 2009/06/09 23:26:19 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -61,7 +61,8 @@
 	cv_init(&lts.cv, NULL);
 
 	mutex_enter(&sleepermtx);
-	simple_unlock(slock);
+	if (slock)
+		simple_unlock(slock);
 	LIST_INSERT_HEAD(&sleepers, &lts, entries);
 
 	/* protected by sleepermtx */

Reply via email to