Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern proper panic for trying to release...
details: https://anonhg.NetBSD.org/src/rev/c8e44653c5c5
branches: trunk
changeset: 757518:c8e44653c5c5
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Sep 01 21:16:56 2010 +0000
description:
proper panic for trying to release implicit lwp
diffstat:
sys/rump/librump/rumpkern/lwproc.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 5cd733e7ce48 -r c8e44653c5c5 sys/rump/librump/rumpkern/lwproc.c
--- a/sys/rump/librump/rumpkern/lwproc.c Wed Sep 01 19:57:52 2010 +0000
+++ b/sys/rump/librump/rumpkern/lwproc.c Wed Sep 01 21:16:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwproc.c,v 1.1 2010/09/01 19:37:58 pooka Exp $ */
+/* $NetBSD: lwproc.c,v 1.2 2010/09/01 21:16:56 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.1 2010/09/01 19:37:58 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.2 2010/09/01 21:16:56 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -320,6 +320,9 @@
struct proc *p;
struct lwp *l = curlwp;
+ if (l->l_refcnt == 0 && l->l_flag & LW_WEXIT)
+ panic("releasing non-pertinent lwp");
+
p = l->l_proc;
mutex_enter(p->p_lock);
KASSERT(l->l_refcnt != 0);
Home |
Main Index |
Thread Index |
Old Index