summaryrefslogtreecommitdiff
path: root/sys/kern/kern_kthread.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-11-29 12:24:19 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-11-29 12:24:19 +0000
commit83368008eb99b7d2d9cb6f221de83c9af517b654 (patch)
tree0a2dbd431fbc167b1d69b949392ff3f47e6a82ef /sys/kern/kern_kthread.c
parente83961e1eb1bda3be0177245339cfd8037ed4c4a (diff)
Kernel stack can be swapped. This means that stuff that's on the stack
should never be referenced outside the context of the process to which this stack belongs unless we do the PHOLD/PRELE dance. Loads of code doesn't follow the rules here. Instead of trying to track down all offenders and fix this hairy situation, it makes much more sense to not swap kernel stacks. From art@, tested by many some time ago.
Diffstat (limited to 'sys/kern/kern_kthread.c')
-rw-r--r--sys/kern/kern_kthread.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index 7f8e60b7141..e60176d611d 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_kthread.c,v 1.25 2005/12/03 18:09:08 tedu Exp $ */
+/* $OpenBSD: kern_kthread.c,v 1.26 2006/11/29 12:24:17 miod Exp $ */
/* $NetBSD: kern_kthread.c,v 1.3 1998/12/22 21:21:36 kleink Exp $ */
/*-
@@ -81,10 +81,9 @@ kthread_create(void (*func)(void *), void *arg,
return (error);
/*
- * Mark it as a system process and not a candidate for
- * swapping.
+ * Mark it as a system process.
*/
- p2->p_flag |= P_INMEM | P_SYSTEM; /* XXX */
+ p2->p_flag |= P_SYSTEM;
/* Name it as specified. */
va_start(ap, fmt);