⬢ DragonFlyBSD Kernel Audit
DF-2388 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/acpica/acpi_panasonic/acpi_panasonic.c
+++ b/sys/dev/acpica/acpi_panasonic/acpi_panasonic.c
@@ -209,9 +209,10 @@
 	/* Remove power profile event handler */
 	EVENTHANDLER_DEREGISTER(power_profile_change, sc->power_evh);
 
-	/* Remove notify handler */
+	/* Remove notify handler and drain in-flight notifies */
 	AcpiRemoveNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY,
 	    acpi_panasonic_notify);
+	AcpiOsWaitEventsComplete();	/* DF-2381 class: must actually drain */
 
 	/* Free sysctl tree */
 	sysctl_ctx_free(&sc->sysctl_ctx);