From 7cf25ed92f8756d1d008ed7f94b1273c15706db6 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 12 Aug 2004 06:15:50 +0000 Subject: [PATCH] Set the thread to the Allocated IRPs created by Io/Nt Query functions that didn't do this. This can cause problems if the thread is ever read on a completed request. svn path=/trunk/; revision=10504 --- reactos/ntoskrnl/io/dir.c | 3 ++- reactos/ntoskrnl/io/file.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/dir.c b/reactos/ntoskrnl/io/dir.c index bd8c10bb61a..3f6ca5d028a 100644 --- a/reactos/ntoskrnl/io/dir.c +++ b/reactos/ntoskrnl/io/dir.c @@ -1,4 +1,4 @@ -/* $Id: dir.c,v 1.21 2003/12/14 17:44:02 hbirr Exp $ +/* $Id: dir.c,v 1.22 2004/08/12 06:15:49 ion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -125,6 +125,7 @@ NtQueryDirectoryFile( Irp->RequestorMode = PreviousMode; Irp->UserIosb = IoStatusBlock; Irp->UserEvent = &FileObject->Event; + Irp->Tail.Overlay.Thread = PsGetCurrentThread(); KeResetEvent( &FileObject->Event ); Irp->UserBuffer=FileInformation; diff --git a/reactos/ntoskrnl/io/file.c b/reactos/ntoskrnl/io/file.c index fa0e14e3413..8861ca0f5fa 100644 --- a/reactos/ntoskrnl/io/file.c +++ b/reactos/ntoskrnl/io/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.31 2004/07/24 01:28:04 navaraf Exp $ +/* $Id: file.c,v 1.32 2004/08/12 06:15:50 ion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -91,6 +91,7 @@ NtQueryInformationFile(HANDLE FileHandle, Irp->AssociatedIrp.SystemBuffer = SystemBuffer; Irp->UserIosb = IoStatusBlock; Irp->UserEvent = &FileObject->Event; + Irp->Tail.Overlay.Thread = PsGetCurrentThread(); KeResetEvent( &FileObject->Event ); StackPtr = IoGetNextIrpStackLocation(Irp); @@ -339,6 +340,7 @@ IoQueryFileInformation(IN PFILE_OBJECT FileObject, Irp->AssociatedIrp.SystemBuffer = FileInformation; Irp->UserIosb = &IoStatusBlock; Irp->UserEvent = &FileObject->Event; + Irp->Tail.Overlay.Thread = PsGetCurrentThread(); KeResetEvent( &FileObject->Event ); StackPtr = IoGetNextIrpStackLocation(Irp);