Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccae2233 authored by Armin Wolf's avatar Armin Wolf Committed by Greg Kroah-Hartman
Browse files

ACPI: EC: Fix oops when removing custom query handlers



[ Upstream commit e5b492c6bb900fcf9722e05f4a10924410e170c1 ]

When removing custom query handlers, the handler might still
be used inside the EC query workqueue, causing a kernel oops
if the module holding the callback function was already unloaded.

Fix this by flushing the EC query workqueue when removing
custom query handlers.

Tested on a Acer Travelmate 4002WLMi

Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 48ac727e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1118,6 +1118,7 @@ static void acpi_ec_remove_query_handlers(struct acpi_ec *ec,
void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit)
{
	acpi_ec_remove_query_handlers(ec, false, query_bit);
	flush_workqueue(ec_query_wq);
}
EXPORT_SYMBOL_GPL(acpi_ec_remove_query_handler);