NetBSD-Bugs archive

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

PR/50330 CVS commit: src/sys/kern

The following reply was made to PR kern/50330; it has been noted by GNATS.

From: "Paul Goyette" <>
Subject: PR/50330 CVS commit: src/sys/kern
Date: Tue, 13 Oct 2015 00:29:35 +0000

 Module Name:	src
 Committed By:	pgoyette
 Date:		Tue Oct 13 00:29:35 UTC 2015
 Modified Files:
 	src/sys/kern: kern_exec.c
 Log Message:
 In spawn_return() we temporarily move the process state to SSTOP, but
 without updating its p_waited value or its parent's p_nstopchild
 counter.  Later, we restore the original state, again without any
 adjustment of the related values.  This leaves a relatively short
 window when the values are inconsistent and could interfere with the
 proper operation of sys_wait() for the parent (if it manages to be
 scheduled;  it's not totally clear what, if anything, prevents
 scheduling/execution of the parent).
 If during this window, any of the checks being made result in an
 error, we call exit1() which will eventually migrate the process's
 state to SDEAD (with an intermediate transition to SDYING).  At
 this point the other variables get updated, and we finally restore
 a consistent state.
 This change updates the p_waited and parent's p_nstopchild at each
 step to eliminate any windows during which the values could lead to
 incorrect decisions.
 Fixes PR kern/50330
 Pullups will be requested for NetBSD-7, -6, -6-0, and -6-1
 To generate a diff of this commit:
 cvs rdiff -u -r1.419 -r1.420 src/sys/kern/kern_exec.c
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index