mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-25 11:55:37 +00:00
ACPI: bus: Ensure that notify handlers are not running after removal
[ Upstream commitfaae443738
] 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:5894b0c46e
("ACPI / scan: Move bus operations and notification routines to bus.c") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
290e26ec0d
commit
0985838a9c
1 changed files with 1 additions and 0 deletions
|
@ -586,6 +586,7 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device,
|
|||
acpi_remove_notify_handler(device->handle, type,
|
||||
acpi_notify_device);
|
||||
}
|
||||
acpi_os_wait_events_complete();
|
||||
}
|
||||
|
||||
/* Handle events targeting \_SB device (at present only graceful shutdown) */
|
||||
|
|
Loading…
Reference in a new issue