[PATCH] efi: fix GetNextDevicePathInstance trace argument
Ahmad Fatoum <[email protected]> Thu, 9 Jul 2026 09:44:28 +0200
| Newsgroups | org.infradead.lists.barebox |
|---|---|
| Message-ID | <[email protected]> |
Verbose EFI tracing formats device paths with %pD. The GetNextDevicePathInstance wrapper receives an EFI_DEVICE_PATH **, but passed that pointer slot directly to %pD. When the SCT called the service, the trace formatter interpreted stack bytes as a device path and could loop before the service body was reached. Log the pointed-to device path when the argument itself is present. This keeps the trace useful while avoiding a tracing-induced hang during the Device Path Utilities ACS coverage. Assisted-by: Codex:gpt-5.5 Signed-off-by: Ahmad Fatoum <[email protected]> --- efi/loader/protocols/device_path_utilities.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/efi/loader/protocols/device_path_utilities.c b/efi/loader/protocols/device_path_utilities.c index ef88e2d647fb..8788149f6de4 100644 --- a/efi/loader/protocols/device_path_utilities.c +++ b/efi/loader/protocols/device_path_utilities.c @@ -143,7 +143,8 @@ static struct efi_device_path * EFIAPI get_next_device_path_instance( struct efi_device_path **device_path_instance, efi_uintn_t *device_path_instance_size) { - EFI_ENTRY("%pD, %p", device_path_instance, device_path_instance_size); + EFI_ENTRY("%pD, %p", device_path_instance ? *device_path_instance : NULL, + device_path_instance_size); return EFI_EXIT(efi_dp_get_next_instance(device_path_instance, device_path_instance_size)); } -- 2.47.3