mirror of
https://github.com/reactos/reactos.git
synced 2024-10-03 07:53:49 +00:00
- NtWrite/ReadFile: Don't hardcode Irp->RequestorMode to KernelMode! Instead, use the PreviousMode we saved earlier. This caused user mode APCs to be called from kernel mode, which is a...very...bad... idea.
- Spotted by bug 3607 and exposed by ntdll Winetests "file" See issue #3607 for more details. svn path=/trunk/; revision=37102
This commit is contained in:
parent
7bfa0b86e3
commit
f467429483
|
@ -2070,7 +2070,7 @@ NtReadFile(IN HANDLE FileHandle,
|
|||
/* Set the IRP */
|
||||
Irp->Tail.Overlay.OriginalFileObject = FileObject;
|
||||
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
|
||||
Irp->RequestorMode = KernelMode;
|
||||
Irp->RequestorMode = PreviousMode;
|
||||
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
||||
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
||||
Irp->UserIosb = IoStatusBlock;
|
||||
|
@ -2929,7 +2929,7 @@ NtWriteFile(IN HANDLE FileHandle,
|
|||
/* Set the IRP */
|
||||
Irp->Tail.Overlay.OriginalFileObject = FileObject;
|
||||
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
|
||||
Irp->RequestorMode = KernelMode;
|
||||
Irp->RequestorMode = PreviousMode;
|
||||
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
||||
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
||||
Irp->UserIosb = IoStatusBlock;
|
||||
|
|
Loading…
Reference in a new issue