mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 04:43:47 +00:00
[NTOS:PS]
- Properly acquire process rundown - Reference job object when assigning a process to it - Don't assert when creating a child process whose parent is in a job Fixes crashes in kernel32_winetest:process svn path=/trunk/; revision=70177
This commit is contained in:
parent
3638c8781a
commit
85fe2a25a0
2 changed files with 2 additions and 3 deletions
|
@ -166,8 +166,7 @@ NtAssignProcessToJobObject (
|
||||||
/* lock the process so we can safely assign the process. Note that in the
|
/* lock the process so we can safely assign the process. Note that in the
|
||||||
meanwhile another thread could have assigned this process to a job! */
|
meanwhile another thread could have assigned this process to a job! */
|
||||||
|
|
||||||
ExAcquireRundownProtection(&Process->RundownProtect);
|
if(ExAcquireRundownProtection(&Process->RundownProtect))
|
||||||
if(NT_SUCCESS(Status))
|
|
||||||
{
|
{
|
||||||
if(Process->Job == NULL && PsGetProcessSessionId(Process) == Job->SessionId)
|
if(Process->Job == NULL && PsGetProcessSessionId(Process) == Job->SessionId)
|
||||||
{
|
{
|
||||||
|
@ -176,6 +175,7 @@ NtAssignProcessToJobObject (
|
||||||
the job object might require it to wait, which is a bad thing
|
the job object might require it to wait, which is a bad thing
|
||||||
while holding the process lock! */
|
while holding the process lock! */
|
||||||
Process->Job = Job;
|
Process->Job = Job;
|
||||||
|
ObReferenceObject(Job);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -714,7 +714,6 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
||||||
{
|
{
|
||||||
/* FIXME: We need to insert this process */
|
/* FIXME: We need to insert this process */
|
||||||
DPRINT1("Jobs not yet supported\n");
|
DPRINT1("Jobs not yet supported\n");
|
||||||
ASSERT(FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create PEB only for User-Mode Processes */
|
/* Create PEB only for User-Mode Processes */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue