[ntoskrnl/ps]

- Acquire and Release RundownProtection on the Parent Pocess not the newly created Pcess when setting the SectionObject.

svn path=/trunk/; revision=48631
This commit is contained in:
Michael Martin 2010-08-27 22:18:10 +00:00
parent 3a325683bc
commit a9e0dc23a4

View file

@ -469,14 +469,14 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
if (Parent != PsInitialSystemProcess) if (Parent != PsInitialSystemProcess)
{ {
/* It's not, so acquire the process rundown */ /* It's not, so acquire the process rundown */
if (ExAcquireRundownProtection(&Process->RundownProtect)) if (ExAcquireRundownProtection(&Parent->RundownProtect))
{ {
/* If the parent has a section, use it */ /* If the parent has a section, use it */
SectionObject = Parent->SectionObject; SectionObject = Parent->SectionObject;
if (SectionObject) ObReferenceObject(SectionObject); if (SectionObject) ObReferenceObject(SectionObject);
/* Release process rundown */ /* Release process rundown */
ExReleaseRundownProtection(&Process->RundownProtect); ExReleaseRundownProtection(&Parent->RundownProtect);
} }
/* If we don't have a section object */ /* If we don't have a section object */