Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Update value of p_stat before we release the proc_l...



details:   https://anonhg.NetBSD.org/src/rev/1da01d60439f
branches:  trunk
changeset: 811102:1da01d60439f
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Oct 13 06:47:21 2015 +0000

description:
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.

XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2}

diffstat:

 sys/kern/kern_exit.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r d899c571d16f -r 1da01d60439f sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c      Tue Oct 13 04:34:38 2015 +0000
+++ b/sys/kern/kern_exit.c      Tue Oct 13 06:47:21 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exit.c,v 1.247 2015/10/13 00:28:22 pgoyette Exp $ */
+/*     $NetBSD: kern_exit.c,v 1.248 2015/10/13 06:47:21 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.247 2015/10/13 00:28:22 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.248 2015/10/13 06:47:21 pgoyette Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_dtrace.h"
@@ -235,8 +235,8 @@
                }
                p->p_waited = 0;
                p->p_pptr->p_nstopchild++;
+               p->p_stat = SSTOP;
                mutex_exit(proc_lock);
-               p->p_stat = SSTOP;
                lwp_lock(l);
                p->p_nrlwps--;
                l->l_stat = LSSTOP;



Home | Main Index | Thread Index | Old Index