mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 12:40:33 +00:00
[ntoskrnl]
- Fix a crash in KiSystemCall that was caused because PsConvertToGuiThread may have switched to a large kernel stack, but still returned with failure because win32k did not succeed. To fix it reload the trap frame after the call before checking for success. svn path=/trunk/; revision=55724
This commit is contained in:
parent
d46e167a87
commit
850d4b4ddf
1 changed files with 6 additions and 5 deletions
|
@ -1556,6 +1556,11 @@ KiSystemCall(IN PKTRAP_FRAME TrapFrame,
|
||||||
|
|
||||||
/* Convert us to a GUI thread -- must wrap in ASM to get new EBP */
|
/* Convert us to a GUI thread -- must wrap in ASM to get new EBP */
|
||||||
Result = KiConvertToGuiThread();
|
Result = KiConvertToGuiThread();
|
||||||
|
|
||||||
|
/* Reload trap frame and descriptor table pointer from new stack */
|
||||||
|
TrapFrame = *(volatile PVOID*)&Thread->TrapFrame;
|
||||||
|
DescriptorTable = (PVOID)(*(volatile ULONG_PTR*)&Thread->ServiceTable + Offset);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Result))
|
if (!NT_SUCCESS(Result))
|
||||||
{
|
{
|
||||||
/* Set the last error and fail */
|
/* Set the last error and fail */
|
||||||
|
@ -1563,10 +1568,6 @@ KiSystemCall(IN PKTRAP_FRAME TrapFrame,
|
||||||
goto ExitCall;
|
goto ExitCall;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reload trap frame and descriptor table pointer from new stack */
|
|
||||||
TrapFrame = *(volatile PVOID*)&Thread->TrapFrame;
|
|
||||||
DescriptorTable = (PVOID)(*(volatile ULONG_PTR*)&Thread->ServiceTable + Offset);
|
|
||||||
|
|
||||||
/* Validate the system call number again */
|
/* Validate the system call number again */
|
||||||
if (Id >= DescriptorTable->Limit)
|
if (Id >= DescriptorTable->Limit)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue