Source-Changes-HG archive

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

[src/trunk]: src/sys/kern sysctl_doeproc: don't follow a possibly stale pointer.



details:   https://anonhg.NetBSD.org/src/rev/ebb93ea76b9a
branches:  trunk
changeset: 752089:ebb93ea76b9a
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Feb 13 11:22:21 2010 +0000

description:
sysctl_doeproc: don't follow a possibly stale pointer.

diffstat:

 sys/kern/init_sysctl.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 18e0ad93bf25 -r ebb93ea76b9a sys/kern/init_sysctl.c
--- a/sys/kern/init_sysctl.c    Sat Feb 13 11:21:55 2010 +0000
+++ b/sys/kern/init_sysctl.c    Sat Feb 13 11:22:21 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init_sysctl.c,v 1.172 2010/01/13 01:53:38 pooka Exp $ */
+/*     $NetBSD: init_sysctl.c,v 1.173 2010/02/13 11:22:21 yamt Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.172 2010/01/13 01:53:38 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.173 2010/02/13 11:22:21 yamt Exp $");
 
 #include "opt_sysv.h"
 #include "opt_compat_netbsd32.h"
@@ -2344,6 +2344,7 @@
                        LIST_REMOVE(marker, p_list);
                } else {
                        rw_exit(&p->p_reflock);
+                       next = LIST_NEXT(p, p_list);
                }
        }
        mutex_exit(proc_lock);



Home | Main Index | Thread Index | Old Index