Queued error status nodes retain a pointer to their struct ghes so that ghes_proc_in_irq() can process the record later. Device removal stops new notifications, but it can free that source while previously queued IRQ work still holds the pointer.
Drain the global IRQ work after unregistering the notification source and before releasing the GHES resources. Reported-by: [email protected] Link: https://sashiko.dev/#/message/20260617140908.9FEA81F000E9%40smtp.kernel.org Signed-off-by: Ahmed Tiba <[email protected]> --- drivers/acpi/apei/ghes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 03eee0b2500e..dd3a698990e2 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -1926,6 +1926,7 @@ static void ghes_remove(struct platform_device *ghes_dev) break; } + irq_work_sync(&ghes_proc_irq_work); ghes_fini(ghes); mutex_lock(&ghes_devs_mutex); -- 2.43.0
