summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-11-24 15:41:32 -0600
committerTom Rini <[email protected]>2024-11-24 15:41:32 -0600
commit880fcc49eb40a78ed27ff575aa02034d7bd74e80 (patch)
treef31c80f6079688c879048751172e305100c37eb9 /lib
parent6c791b6646c101b5bed6537dafbe7361185466ea (diff)
parentdabaa4ae32062cb3f3d995e5c63e6cef54ad079b (diff)
Merge patch series "Fix device removal order for Apple dart iommu"
Janne Grunau <[email protected]> says: Starting with v2024.10 dev_iommu_dma_unmap calls during device removal trigger a NULL pointer dereference in the Apple dart iommu driver. The iommu device is removed before its user. The sparsely used DM_FLAG_VITAL flag is intended to describe this dependency. Add it to the driver. Adding this flag is unfortunately not enough since the boot routines except the arm one simply remove all drivers. Add and use a new function which calls dm_remove_devioce_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL); dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL); to ensure this order dependency is head consistently. Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_boottime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 4f52284b4c6..080e7f78ae3 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -2234,7 +2234,7 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
if (IS_ENABLED(CONFIG_USB_DEVICE))
udc_disconnect();
board_quiesce_devices();
- dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
+ dm_remove_devices_active();
}
/* Patch out unsupported runtime function */