reactos/ntoskrnl/include/internal
George Bișoc fe23a4aaeb
[NTOS:CM] Lock the entire registry down when we unload a hive
The PR #6649 which fixed an issue with orphaned KCBs leaking in memory which also pointed to unloaded registry hives, it also brought a problem.
In CmpEnumerateOpenSubKeys there is a risk of getting hit by a deadlock as we enumerate the cache table to remove empty cache entries.

Fundamentally CmpEnumerateOpenSubKeys locks down a KCB from cache for exclusive use in order to tear down its contents from memory but it doesn't address the fact a KCB might have already been locked in the same calling thread, leading to a recursion.
This leads to random hangs when unloading a hive during system startup (tipically on a clean install).

The solution here is to simply lock the whole registry when we unload a hive so that we don't have to worry the KCBs are getting tampered by anybody else. This also simplifies the code.
Although locking the entire registry while other apps are doing registry related operations to other hives can cause overhead. If this turns out to be bad then we have to rethink the locking mechanism here.

CORE-19539
2024-06-01 16:17:47 +02:00
..
amd64 [NTOS:KE] Fix NtRaiseException and NtContinue on x64 2024-05-01 11:30:29 +02:00
arch
arm [NTOSKRNL] Remove remnant internal/arm/asmmacro.S (#6052) 2023-12-14 13:48:31 +00:00
i386 [NTOS:KE] Fix NtRaiseException and NtContinue on x64 2024-05-01 11:30:29 +02:00
cc.h NTOS:CC Free some VACBs when we're under memory pressure 2023-07-29 14:00:44 +03:00
cm.h [NTOS:CM] Lock the entire registry down when we unload a hive 2024-06-01 16:17:47 +02:00
cm_x.h [NTOS:CM] Add debug code for analyzing lock issues 2024-05-23 21:21:35 +02:00
cmboot.h [NTOS:CM] Adapt cmboot.c for usage in NT/ReactOS bootloader. 2022-04-16 18:37:45 +02:00
dbgk.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
ex.h [NTOS:EX][CSRSRV][WIN32K] Make a few #define more explicit/strict (#5907) 2023-11-13 20:55:48 +01:00
fsrtl.h [NTOS] Properly implement and use FsRtlAcquireFileForModWriteEx 2022-11-02 19:41:04 +01:00
hal.h [FSTUB] Fix bugs from 8d2fe54188 2020-12-07 19:50:51 +03:00
hdl.h
icif.h [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
inbv.h [NTOS:INBV] Code refactoring: Move all the boot animation-specific code out of inbv.c and into the new bootanim.c file. 2022-02-13 21:29:14 +01:00
io.h [NTOS:PNP][UMPNPMGR] GUID_DEVICE_ENUMERATED should be a DeviceInstallEvent 2023-12-03 14:00:34 +01:00
io_i.h
io_x.h [NTOS:IO] Use a guarded region in IopQueueIrpToThread. 2021-11-20 14:58:51 -05:00
kd.h [NTOS:KD:KDBG] Integration into KD framework (Part 1/3) 2023-08-31 16:07:51 +02:00
kd64.h [NTOS:KE/x64] Implement Kd processor switching 2024-04-23 15:50:06 +02:00
ke.h [NTOS:KE] Fix NtRaiseException and NtContinue on x64 2024-05-01 11:30:29 +02:00
ke_x.h [NTOS] Fix boot on UP build - PrcbLocks are not used on UP (#6391) 2024-01-20 08:59:13 -08:00
ldr.h
lpc.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
lpc_x.h
mm.h [NTOS:MM] Add ASSERTS to MmLockAddressSpace to guarantee lock ordering 2023-10-24 21:45:27 +03:00
napi.h
ntoskrnl.h [NTOS] Include kdbg/kdb.h only in the files that really need it. 2023-04-11 00:44:10 +02:00
ob.h [NTOS:OB] Add a system process quota block macro 2022-01-11 10:11:09 +01:00
ob_x.h [NTOS:OB] Clarify and fix the usage of the Obp*DirectoryLock*() and ObpReleaseLookupContextObject() functions. 2021-09-25 00:47:43 +02:00
po.h [NTOS:PO] Give the power device type to PopAddRemoveSysCapsCallback function 2024-02-05 18:04:02 +01:00
probe.h [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
ps.h [NTOS:MM/PS] Remove code duplication between LookupEntryPoint/MiLocateExportName/MiFindExportedRoutineByName. (#4918) 2023-08-29 17:26:57 +02:00
ps_i.h [NTOS:PS] Support using QUOTA_LIMITS_EX in NtSetInformationProcess(ProcessQuotaLimits) 2021-07-15 19:33:45 +02:00
ps_x.h
rtl.h [NTOS:PS] On x64 don't fail in NtSetInformationProcess with ProcessUserModeIOPL information class, instead just don't do anything. 2020-09-20 23:08:17 +02:00
se.h [RTL] Improve usage of absolte vs self-relative security descriptors 2023-09-26 18:01:45 +03:00
spinlock.h [NTOS:KE] Test spinlock ownership on both UP & MP build 2021-06-29 11:49:20 +02:00
tag.h [NTOS:SE] Do not allocate memory pool just for the access rights 2023-03-07 17:50:39 +01:00
test.h
vdm.h