]> git.ipfire.org Git - people/arne_f/kernel.git/commit
ACPI / SBS: Fix rare oops when removing modules
authorRonald Tschalär <ronald@innovation.ch>
Mon, 1 Oct 2018 02:53:13 +0000 (19:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:20:31 +0000 (08:20 +0100)
commitd43b7b99fe770266e8b968827a2e4aead3135680
treee8e8a82f9c5e25ed86856a1475112f2cb06518f8
parent7f02606367b3aecf1c365d3f076ae643c90fdb8d
ACPI / SBS: Fix rare oops when removing modules

[ Upstream commit 757c968c442397f1249bb775a7c8c03842e3e0c7 ]

There was a small race when removing the sbshc module where
smbus_alarm() had queued acpi_smbus_callback() for deferred execution
but it hadn't been run yet, so that when it did run hc had been freed
and the module unloaded, resulting in an invalid paging request.

A similar race existed when removing the sbs module with regards to
acpi_sbs_callback() (which is called from acpi_smbus_callback()).

We therefore need to ensure no callbacks are pending or executing before
the cleanups are done and the modules are removed.

Signed-off-by: Ronald Tschalär <ronald@innovation.ch>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/osl.c
drivers/acpi/sbshc.c