efi_loader: use EfiBootServicesData for device path
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 17 Aug 2021 13:15:23 +0000 (15:15 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 17 Aug 2021 15:24:08 +0000 (17:24 +0200)
dp_alloc() was using a constant from the wrong enum resulting in creating
device paths in EfiReservedMemory.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_device_path.c

index 9c3ac71..cbdb466 100644 (file)
@@ -68,7 +68,7 @@ static void *dp_alloc(size_t sz)
 {
        void *buf;
 
-       if (efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, sz, &buf) !=
+       if (efi_allocate_pool(EFI_BOOT_SERVICES_DATA, sz, &buf) !=
            EFI_SUCCESS) {
                debug("EFI: ERROR: out of memory in %s\n", __func__);
                return NULL;