Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/kern Pull up rev. 1.76:



details:   https://anonhg.NetBSD.org/src/rev/ed53344a7b7d
branches:  netbsd-1-5
changeset: 488981:ed53344a7b7d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Aug 08 23:46:56 2000 +0000

description:
Pull up rev. 1.76:
In fill_kproc2(), testing p->p_stats != NULL doesn't do much good,
instead test for (p->p_flag & I_INMEM), and don't access the U-area
(via p->p_stats) if that bit is clear.  Fixes the hangs people have
seen when the system is paging and the user runs top/ps/w.

diffstat:

 sys/kern/kern_sysctl.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 7462306e1d5f -r ed53344a7b7d sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c    Tue Aug 08 19:56:47 2000 +0000
+++ b/sys/kern/kern_sysctl.c    Tue Aug 08 23:46:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sysctl.c,v 1.73.2.2 2000/07/22 04:38:14 simonb Exp $      */
+/*     $NetBSD: kern_sysctl.c,v 1.73.2.3 2000/08/08 23:46:56 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -1565,7 +1565,7 @@
                ki->p_eflag |= EPROC_SLEADER;
 
        /* XXX Is this double check necessary? */
-       if (P_ZOMBIE(p) || p->p_addr == NULL) {
+       if ((p->p_flag & P_INMEM) == 0 || P_ZOMBIE(p)) {
                ki->p_uvalid = 0;
        } else {
                ki->p_uvalid = 1;



Home | Main Index | Thread Index | Old Index