https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a91f5e8e4db2fc9af3d09…
commit a91f5e8e4db2fc9af3d09175e537f16307db17f3
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Mon Oct 25 15:21:43 2021 -0500
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Oct 25 22:21:43 2021 +0200
[UDFS] Fix crash on boot in release builds with UDFS removable media inserted (#4061)
CORE-17598
Changes to specific files and their effects are as follows:
create.cpp - Allows booting past second stage with UDFS media inserted without BSOD
close.cpp - Allows shutdown without hang
dircntrl.cpp - Allows New Hardware Wizard not to hang on initial third phase install
---
drivers/filesystems/udfs/close.cpp | 24 ++++++++++++------------
drivers/filesystems/udfs/create.cpp | 2 +-
drivers/filesystems/udfs/dircntrl.cpp | 12 ++++++------
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/filesystems/udfs/close.cpp b/drivers/filesystems/udfs/close.cpp
index 62f98188380..efd4224782b 100644
--- a/drivers/filesystems/udfs/close.cpp
+++ b/drivers/filesystems/udfs/close.cpp
@@ -921,18 +921,18 @@ UDFCloseAllXXXDelayedInDir(
IN BOOLEAN System
)
{
- PUDF_FILE_INFO* PassedList = NULL;
- ULONG PassedListSize = 0;
- PUDF_FILE_INFO* FoundList = NULL;
- ULONG FoundListSize = 0;
- NTSTATUS RC;
- ULONG i;
- BOOLEAN ResAcq = FALSE;
- BOOLEAN AcquiredVcb = FALSE;
- UDFNTRequiredFCB* NtReqFcb;
- PUDF_FILE_INFO CurFileInfo;
- PFE_LIST_ENTRY CurListPtr;
- PFE_LIST_ENTRY* ListPtrArray = NULL;
+ PUDF_FILE_INFO* PassedList = NULL;
+ ULONG PassedListSize = 0;
+ PUDF_FILE_INFO* FoundList = NULL;
+ ULONG FoundListSize = 0;
+ NTSTATUS RC;
+ ULONG i;
+ _SEH2_VOLATILE BOOLEAN ResAcq = FALSE;
+ _SEH2_VOLATILE BOOLEAN AcquiredVcb = FALSE;
+ UDFNTRequiredFCB* NtReqFcb;
+ PUDF_FILE_INFO CurFileInfo;
+ PFE_LIST_ENTRY CurListPtr;
+ PFE_LIST_ENTRY* ListPtrArray = NULL;
_SEH2_TRY {
diff --git a/drivers/filesystems/udfs/create.cpp b/drivers/filesystems/udfs/create.cpp
index 50d7f39d32c..79509977c1c 100644
--- a/drivers/filesystems/udfs/create.cpp
+++ b/drivers/filesystems/udfs/create.cpp
@@ -204,7 +204,7 @@ UDFCommonCreate(
ACCESS_MASK DesiredAccess;
PACCESS_STATE AccessState;
- PVCB Vcb = NULL;
+ _SEH2_VOLATILE PVCB Vcb = NULL;
_SEH2_VOLATILE BOOLEAN AcquiredVcb = FALSE;
BOOLEAN OpenExisting = FALSE;
PERESOURCE Res1 = NULL;
diff --git a/drivers/filesystems/udfs/dircntrl.cpp
b/drivers/filesystems/udfs/dircntrl.cpp
index 26099e326a7..ce6b52dcc1d 100644
--- a/drivers/filesystems/udfs/dircntrl.cpp
+++ b/drivers/filesystems/udfs/dircntrl.cpp
@@ -134,8 +134,8 @@ UDFCommonDirControl(
PFILE_OBJECT FileObject = NULL;
PtrUDFFCB Fcb = NULL;
PtrUDFCCB Ccb = NULL;
- PVCB Vcb = NULL;
- BOOLEAN AcquiredVcb = FALSE;
+ _SEH2_VOLATILE PVCB Vcb = NULL;
+ _SEH2_VOLATILE BOOLEAN AcquiredVcb = FALSE;
TmPrint(("UDFCommonDirControl: \n"));
// BrutePoint();
@@ -226,8 +226,8 @@ UDFQueryDirectory(
BOOLEAN PostRequest = FALSE;
PtrUDFNTRequiredFCB NtReqFcb = NULL;
BOOLEAN CanWait = FALSE;
- PVCB Vcb = NULL;
- BOOLEAN AcquiredFCB = FALSE;
+ _SEH2_VOLATILE PVCB Vcb = NULL;
+ _SEH2_VOLATILE BOOLEAN AcquiredFCB = FALSE;
unsigned long BufferLength = 0;
UNICODE_STRING SearchPattern;
PUNICODE_STRING PtrSearchPattern;
@@ -696,8 +696,8 @@ UDFNotifyChangeDirectory(
BOOLEAN CanWait = FALSE;
ULONG CompletionFilter = 0;
BOOLEAN WatchTree = FALSE;
- PVCB Vcb = NULL;
- BOOLEAN AcquiredFCB = FALSE;
+ _SEH2_VOLATILE PVCB Vcb = NULL;
+ _SEH2_VOLATILE BOOLEAN AcquiredFCB = FALSE;
PEXTENDED_IO_STACK_LOCATION pStackLocation = (PEXTENDED_IO_STACK_LOCATION) IrpSp;
UDFPrint(("UDFNotifyChangeDirectory\n"));