]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r292440:
authormjg <mjg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 7 Jan 2016 12:08:15 +0000 (12:08 +0000)
committermjg <mjg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 7 Jan 2016 12:08:15 +0000 (12:08 +0000)
commitc2cb775f0d9d1d811372fe3946634ddeb22a47c1
tree1f78838f5f13799f28a5a7f35d1e497d4fd8b9d0
parentc063746ea62eee9e94b41ab79842df2eb5bedf31
MFC r292440:

proc: fix a race which could result in dereference of bad p_pgrp pointer on
fork

During fork p_starcopy - p_endcopy area of a process is populated with bcopy
with only proc lock held. Another forking thread can find such a process and
proceed to access p_pgrp included in said area.

Fix the problem by moving the field outside. It is being properly assigned
later.

git-svn-id: svn://svn.freebsd.org/base/stable/10@293314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_proc.c
sys/sys/proc.h