Skip to content

Commit ccae223

Browse files
Wer-Wolfgregkh
authored andcommitted
ACPI: EC: Fix oops when removing custom query handlers
[ Upstream commit e5b492c ] 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: Armin Wolf <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 48ac727 commit ccae223

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/acpi/ec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,7 @@ static void acpi_ec_remove_query_handlers(struct acpi_ec *ec,
11181118
void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit)
11191119
{
11201120
acpi_ec_remove_query_handlers(ec, false, query_bit);
1121+
flush_workqueue(ec_query_wq);
11211122
}
11221123
EXPORT_SYMBOL_GPL(acpi_ec_remove_query_handler);
11231124

0 commit comments

Comments
 (0)