mirror of
https://github.com/reactos/reactos.git
synced 2024-08-08 12:18:13 +00:00
Yuriy Sidorov <jura@cp-lab.com>
- Fix BSOD in NtUserWaitForInputIdle because KeWaitForMultipleObjects expects actual pointers to objects, not handles. - Fix failure branches to have UserLeave and/or object dereference where needed. See issue #3522 for more details. svn path=/trunk/; revision=34525
This commit is contained in:
parent
fa443b5f5b
commit
81c0fbc19f
|
@ -1898,6 +1898,7 @@ NtUserWaitForInputIdle(
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
UserLeave();
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return WAIT_FAILED;
|
return WAIT_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -1906,16 +1907,22 @@ NtUserWaitForInputIdle(
|
||||||
if (!W32Process)
|
if (!W32Process)
|
||||||
{
|
{
|
||||||
ObDereferenceObject(Process);
|
ObDereferenceObject(Process);
|
||||||
|
UserLeave();
|
||||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||||
return WAIT_FAILED;
|
return WAIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
EngCreateEvent((PEVENT *)&W32Process->InputIdleEvent);
|
EngCreateEvent((PEVENT *)&W32Process->InputIdleEvent);
|
||||||
|
|
||||||
Handles[0] = hProcess;
|
Handles[0] = Process;
|
||||||
Handles[1] = W32Process->InputIdleEvent;
|
Handles[1] = W32Process->InputIdleEvent;
|
||||||
|
|
||||||
if (!Handles[1]) return STATUS_SUCCESS; /* no event to wait on */
|
if (!Handles[1])
|
||||||
|
{
|
||||||
|
ObDereferenceObject(Process);
|
||||||
|
UserLeave();
|
||||||
|
return STATUS_SUCCESS; /* no event to wait on */
|
||||||
|
}
|
||||||
|
|
||||||
StartTime = ((ULONGLONG)SharedUserData->TickCountLowDeprecated *
|
StartTime = ((ULONGLONG)SharedUserData->TickCountLowDeprecated *
|
||||||
SharedUserData->TickCountMultiplier / 16777216);
|
SharedUserData->TickCountMultiplier / 16777216);
|
||||||
|
|
Loading…
Reference in a new issue