From 46718002fd92ad6071bc17d0a8671800e19e703e Mon Sep 17 00:00:00 2001 From: miod Date: Wed, 29 Nov 2006 12:24:15 +0000 Subject: 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. --- sys/miscfs/procfs/procfs_status.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sys/miscfs/procfs/procfs_status.c') diff --git a/sys/miscfs/procfs/procfs_status.c b/sys/miscfs/procfs/procfs_status.c index 0d1a117ffc0..0f26fbf9a52 100644 --- a/sys/miscfs/procfs/procfs_status.c +++ b/sys/miscfs/procfs/procfs_status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_status.c,v 1.8 2004/05/05 23:52:10 tedu Exp $ */ +/* $OpenBSD: procfs_status.c,v 1.9 2006/11/29 12:24:18 miod Exp $ */ /* $NetBSD: procfs_status.c,v 1.11 1996/03/16 23:52:50 christos Exp $ */ /* @@ -119,11 +119,8 @@ procfs_stat_gen(p, s, l) COUNTORCAT(s, l, ps, n); } - if (p->p_flag & P_INMEM) - snprintf(ps, sizeof(ps), " %ld,%ld", - p->p_stats->p_start.tv_sec, p->p_stats->p_start.tv_usec); - else - snprintf(ps, sizeof(ps), " -1,-1"); + snprintf(ps, sizeof(ps), " %ld,%ld", + p->p_stats->p_start.tv_sec, p->p_stats->p_start.tv_usec); COUNTORCAT(s, l, ps, n); calcru(p, &ut, &st, (void *) 0); -- cgit v1.2.3-59-g8ed1b