From 2d9fea6a7c02c79ee9480539dcdc3ff333620909 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Mon, 9 May 2005 01:14:42 +0000 Subject: [PATCH] Fix KDBG and enable IRP_NOCACHE for ReadFile. Also disable SEH for Buffer since PRobeForWrite has a bug and cannot probe past a page svn path=/trunk/; revision=15163 --- reactos/ntoskrnl/io/file.c | 13 +++---------- reactos/ntoskrnl/kdbg/kdb_symbols.c | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/reactos/ntoskrnl/io/file.c b/reactos/ntoskrnl/io/file.c index ebb6d4bcda3..3c43a8695f9 100644 --- a/reactos/ntoskrnl/io/file.c +++ b/reactos/ntoskrnl/io/file.c @@ -2457,9 +2457,11 @@ NtReadFile(IN HANDLE FileHandle, ProbeForWrite(IoStatusBlock, sizeof(IO_STATUS_BLOCK), sizeof(ULONG)); + #if 0 ProbeForWrite(Buffer, Length, sizeof(ULONG)); + #endif } _SEH_HANDLE { @@ -2570,16 +2572,7 @@ NtReadFile(IN HANDLE FileHandle, Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine; Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext; Irp->Flags |= IRP_READ_OPERATION; - - /* FIXME: KDBG is using this flag and not reading from cluster-aligned. Investigate. */ -#if 0 - if (FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING) - { - DbgBreakPoint(); - Irp->Flags |= IRP_NOCACHE; - DPRINT1("It's us: %p\n", FileObject); - } -#endif + if (FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING) Irp->Flags |= IRP_NOCACHE; /* Setup Stack Data */ StackPtr = IoGetNextIrpStackLocation(Irp); diff --git a/reactos/ntoskrnl/kdbg/kdb_symbols.c b/reactos/ntoskrnl/kdbg/kdb_symbols.c index b0098c25a57..89c34b7c7c0 100644 --- a/reactos/ntoskrnl/kdbg/kdb_symbols.c +++ b/reactos/ntoskrnl/kdbg/kdb_symbols.c @@ -439,7 +439,7 @@ KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName, &ObjectAttributes, &IoStatusBlock, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_SYNCHRONOUS_IO_NONALERT|FILE_NO_INTERMEDIATE_BUFFERING); + FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS(Status)) { DPRINT("Could not open image file: %wZ\n", &FileName);