https://git.reactos.org/?p=reactos.git;a=commitdiff;h=94054a5735d427fdfa8dc8abdbbd4dafeb966036

commit 94054a5735d427fdfa8dc8abdbbd4dafeb966036
Author:     Oleg Dubinskiy <oleg.dubinskij2...@yandex.ua>
AuthorDate: Sun Apr 4 20:57:23 2021 +0300
Commit:     George Bișoc <george.bi...@reactos.org>
CommitDate: Sat Jul 3 21:44:33 2021 +0200

    [NTOS:IO] OpenRegistryHandlesFromSymbolicLink: Use REG_OPTION_NON_VOLATILE
    Use REG_OPTION_NON_VOLATILE instead of REG_OPTION_VOLATILE in all 
ZwCreateKey calls of OpenRegistryHandlesFromSymbolicLink, since the keys 
created/opened by this function, should be non-volatile (in other words, be 
saved after reboot).
    Also Device Parameters subkey that is created in 
IoOpenDeviceInterfaceRegistryKey (which uses that routine as well), is 
non-volatile too, so the parent keys whose contain it, cannot be volatile.
    It will fix an error with status 0xc0000181 (STATUS_CHILD_MUST_BE_VOLATILE) 
occuring during loading kernel mode audio drivers from Windows XP/2003, 
especially checked (debug) versions, with my IoGetDeviceInterfaceAlias 
implementation. Also it may fix other error cases.
    CORE-17361
---
 ntoskrnl/io/iomgr/deviface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ntoskrnl/io/iomgr/deviface.c b/ntoskrnl/io/iomgr/deviface.c
index f909d536461..6a57e7d203b 100644
--- a/ntoskrnl/io/iomgr/deviface.c
+++ b/ntoskrnl/io/iomgr/deviface.c
@@ -103,7 +103,7 @@ OpenRegistryHandlesFromSymbolicLink(IN PUNICODE_STRING 
SymbolicLinkName,
                          &ObjectAttributes,
                          0,
                          NULL,
-                         REG_OPTION_VOLATILE,
+                         REG_OPTION_NON_VOLATILE,
                          NULL);
     ZwClose(ClassesKey);
     if (!NT_SUCCESS(Status))
@@ -154,7 +154,7 @@ OpenRegistryHandlesFromSymbolicLink(IN PUNICODE_STRING 
SymbolicLinkName,
                          &ObjectAttributes,
                          0,
                          NULL,
-                         REG_OPTION_VOLATILE,
+                         REG_OPTION_NON_VOLATILE,
                          NULL);
     if (!NT_SUCCESS(Status))
     {
@@ -172,7 +172,7 @@ OpenRegistryHandlesFromSymbolicLink(IN PUNICODE_STRING 
SymbolicLinkName,
                          &ObjectAttributes,
                          0,
                          NULL,
-                         REG_OPTION_VOLATILE,
+                         REG_OPTION_NON_VOLATILE,
                          NULL);
     if (!NT_SUCCESS(Status))
     {

Reply via email to