audk/MdeModulePkg
Trammell Hudson d0b6596b8e MdeModulePkg/RamDiskDxe: Init list head before registering RamDisk protocol
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3483

This patch initializes the linked list RegisteredRamDisks in
RamDiskDxeEntryPoint before the registration of gEfiRamDiskProtocolGuid
with InstallMultipleProtocolInterfaces, allowing ramdisks to be created
via a callback installed with RegisterProtocolNotify as soon as the
protocol is registered.

Without this, calling RamDisk->Register() in the callback causes a crash:

ASSERT [RamDiskDxe] MdePkg/Library/BaseLib/LinkedList.c(75): List->ForwardLink != ((void *) 0)

Signed-off-by: Trammell Hudson <hudson@trmm.net>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
2021-07-14 03:07:48 +00:00
..
Application MdeModulePkg/CapsuleApp: Fix spelling mistake 2020-08-07 18:53:01 +00:00
Bus MdeModulePkg PciBusDxe: Increase the width of data read during oprom shadow 2021-06-17 03:01:55 +00:00
Core PeiCore: Remove assertion when failing to load PE image 2021-06-16 07:51:00 +00:00
Include MdeModulePkg: Change the PldHeader to Header in ExtraData.h 2021-07-13 08:18:35 +00:00
Library MdeModulePkg: Fix device path when boot manager menu is from different FV 2021-06-15 08:08:15 +00:00
Logo MdeModulePkg/Logo:Add RISCV64 architecture 2020-05-07 03:17:15 +00:00
Test MdeModulePkg/Variable/RuntimeDxe: Add Variable Lock Protocol Unit Tests 2020-12-15 06:26:34 +00:00
Universal MdeModulePkg/RamDiskDxe: Init list head before registering RamDisk protocol 2021-07-14 03:07:48 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Update YAML file to fix CI error 2021-07-07 07:04:47 +00:00
MdeModulePkg.dec MdeModulePkg: Add new structure for the Universal Payload Serial Port Info 2021-06-24 09:16:22 +00:00
MdeModulePkg.dsc MdeModulePkg: Consume MdeLibs.dsc.inc for RegisterFilterLib 2021-03-31 05:47:10 +00:00
MdeModulePkg.uni MdeModulePkg: Fix various typos 2021-05-17 02:10:31 +00:00
MdeModulePkgExtra.uni