mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
- Fixed two really nasty bugs in I/O completion:
- The user buffer wasn't written for incomplete I/O (warning levels) for METHOD_BUFFERED - Incomplete I/Os (warning levels) took a completely wrong path for completion. svn path=/trunk/; revision=19087
This commit is contained in:
parent
a6e23ab5cf
commit
85f0828a18
1 changed files with 7 additions and 5 deletions
|
@ -159,7 +159,9 @@ IopCompleteRequest(PKAPC Apc,
|
||||||
if (Irp->Flags & IRP_BUFFERED_IO)
|
if (Irp->Flags & IRP_BUFFERED_IO)
|
||||||
{
|
{
|
||||||
/* Check if we have an input buffer and if we suceeded */
|
/* Check if we have an input buffer and if we suceeded */
|
||||||
if (Irp->Flags & IRP_INPUT_OPERATION && NT_SUCCESS(Irp->IoStatus.Status))
|
if ((Irp->Flags & IRP_INPUT_OPERATION) &&
|
||||||
|
(Irp->IoStatus.Status != STATUS_VERIFY_REQUIRED) &&
|
||||||
|
!(NT_ERROR(Irp->IoStatus.Status)))
|
||||||
{
|
{
|
||||||
/* Copy the buffer back to the user */
|
/* Copy the buffer back to the user */
|
||||||
RtlCopyMemory(Irp->UserBuffer,
|
RtlCopyMemory(Irp->UserBuffer,
|
||||||
|
@ -191,10 +193,10 @@ IopCompleteRequest(PKAPC Apc,
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
/* Check for Success but allow failure for Async IRPs */
|
/* Check for Success but allow failure for Async IRPs */
|
||||||
if (NT_SUCCESS(Irp->IoStatus.Status) ||
|
if (!(NT_ERROR(Irp->IoStatus.Status)) ||
|
||||||
(Irp->PendingReturned &&
|
((NT_ERROR(Irp->IoStatus.Status)) &&
|
||||||
!SyncIrp &&
|
(Irp->PendingReturned) && !(SyncIrp) &&
|
||||||
(FileObject == NULL || FileObject->Flags & FO_SYNCHRONOUS_IO)))
|
((FileObject == NULL) || (FileObject->Flags & FO_SYNCHRONOUS_IO))))
|
||||||
{
|
{
|
||||||
_SEH_TRY
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue