diff --git a/patches.suse/ACPI-bus-Ensure-that-notify-handlers-are-not-running.patch b/patches.suse/ACPI-bus-Ensure-that-notify-handlers-are-not-running.patch new file mode 100644 index 0000000..4469c51 --- /dev/null +++ b/patches.suse/ACPI-bus-Ensure-that-notify-handlers-are-not-running.patch @@ -0,0 +1,34 @@ +From faae443738c6f0dac9b0d3d11d108f6911a989a9 Mon Sep 17 00:00:00 2001 +From: "Rafael J. Wysocki" +Date: Fri, 14 Apr 2023 16:00:48 +0200 +Subject: [PATCH] ACPI: bus: Ensure that notify handlers are not running after removal +Git-commit: faae443738c6f0dac9b0d3d11d108f6911a989a9 +Patch-mainline: v6.4-rc1 +References: git-fixes + +Currently, acpi_device_remove_notify_handler() may return while the +notify handler being removed is still running which may allow the +module holding that handler to be torn down prematurely. + +Address this issue by making acpi_device_remove_notify_handler() wait +for the handling of all the ACPI events in progress to complete before +returning. + +Fixes: 5894b0c46e49 ("ACPI / scan: Move bus operations and notification routines to bus.c") +Signed-off-by: Rafael J. Wysocki +Acked-by: Takashi Iwai + +--- + drivers/acpi/bus.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/acpi/bus.c ++++ b/drivers/acpi/bus.c +@@ -572,6 +572,7 @@ static void acpi_device_remove_notify_ha + else + acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, + acpi_notify_device); ++ acpi_os_wait_events_complete(); + } + + /* Handle events targeting \_SB device (at present only graceful shutdown) */ diff --git a/series.conf b/series.conf index 63d3700..1e82aa1 100644 --- a/series.conf +++ b/series.conf @@ -19840,6 +19840,7 @@ patches.suse/hwmon-pmbus-fsp-3y-Fix-functionality-bitmask-in-FSP-.patch patches.suse/ACPI-processor-Fix-evaluating-_PDC-method-when-runni.patch patches.suse/ACPI-VIOT-Initialize-the-correct-IOMMU-fwspec.patch + patches.suse/ACPI-bus-Ensure-that-notify-handlers-are-not-running.patch patches.suse/crypto-safexcel-Cleanup-ring-IRQ-workqueues-on-load-.patch patches.suse/crypto-caam-Clear-some-memory-in-instantiate_rng.patch patches.suse/crypto-sa2ul-Select-CRYPTO_DES.patch