]> git.itanic.dy.fi Git - linux-stable/commit
ACPI: EC: Fix oops when removing custom query handlers
authorArmin Wolf <W_Armin@gmx.de>
Fri, 24 Mar 2023 20:26:27 +0000 (21:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 11:38:34 +0000 (12:38 +0100)
commit130e3eac51912f2c866e7d035992ede25f8feac0
treec6e15655fa00cac31443cef862d931477845c13c
parent3faa6fe21c516dbcca469c297df77decbc2fed0f
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: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/ec.c