audk/MdeModulePkg/Universal/Disk/RamDiskDxe
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
..
RamDisk.asl MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RamDiskBlockIo.c MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RamDiskDriver.c MdeModulePkg/RamDiskDxe: Init list head before registering RamDisk protocol 2021-07-14 03:07:48 +00:00
RamDiskDxe.inf MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RamDiskDxe.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RamDiskFileExplorer.c MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RamDiskHii.vfr MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RamDiskHiiStrings.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RamDiskImpl.c MdeModulePkg/RamDiskDxe: Use BaseLib linked list iteration macros 2020-04-21 02:20:51 +00:00
RamDiskImpl.h MdeModulePkg/RamDiskDxe: Use BaseLib linked list iteration macros 2020-04-21 02:20:51 +00:00
RamDiskNVData.h MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
RamDiskProtocol.c MdeModulePkg/RamDiskDxe: Use BaseLib linked list iteration macros 2020-04-21 02:20:51 +00:00