linux-stable/drivers/power
Sven Van Asbroeck bf592c56b1 max17042_battery: fix potential use-after-free on device remove
The work which is scheduled on a POR boot is potentially left
pending or running until after the device module is removed,
which could result in a use-after-free.

Fix by registering a cancel/sync callback, which gets executed as
part of standard resource unwinding.

This issue was detected with the help of Coccinelle.

Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-02-20 00:36:52 +01:00
..
avs PM / AVS: SmartReflex: Switch to SPDX Licence ID 2018-12-12 13:54:28 +01:00
reset power supply and reset changes for the v4.21 series 2018-12-28 20:22:45 -08:00
supply max17042_battery: fix potential use-after-free on device remove 2019-02-20 00:36:52 +01:00
Kconfig power: move power supply drivers to power/supply 2016-08-11 01:11:03 +02:00
Makefile power: move power supply drivers to power/supply 2016-08-11 01:11:03 +02:00