Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Remove a KPREEMPT_ENABLE() in an error path I overl...
details: https://anonhg.NetBSD.org/src/rev/008dec55c69a
branches: trunk
changeset: 777930:008dec55c69a
user: martin <martin%NetBSD.org@localhost>
date: Sat Mar 10 14:35:05 2012 +0000
description:
Remove a KPREEMPT_ENABLE() in an error path I overlooked in the previous
change - pointed out by Manuel Bouyer.
While there, add a KASSERT() to make sure we have preemption enabled in
the success case.
diffstat:
sys/kern/kern_exec.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 87ace45db4fe -r 008dec55c69a sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Sat Mar 10 08:46:45 2012 +0000
+++ b/sys/kern/kern_exec.c Sat Mar 10 14:35:05 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.345 2012/03/10 08:46:45 martin Exp $ */
+/* $NetBSD: kern_exec.c,v 1.346 2012/03/10 14:35:05 martin Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.345 2012/03/10 08:46:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.346 2012/03/10 14:35:05 martin Exp $");
#include "opt_exec.h"
#include "opt_ktrace.h"
@@ -1883,6 +1883,7 @@
/* we now have our own vmspace */
KPREEMPT_ENABLE(l);
+ KASSERT(l->l_nopreempt == 0);
/* done, signal parent */
mutex_enter(&spawn_data->sed_mtx_child);
@@ -1904,7 +1905,7 @@
KPREEMPT_DISABLE(l);
pmap_deactivate(l);
l->l_proc->p_vmspace = NULL;
- KPREEMPT_ENABLE(l);
+ /* do not enable preemption without vmspace */
}
/*
Home |
Main Index |
Thread Index |
Old Index