linux-stable/drivers/power
Sven Van Asbroeck 1b6901f3c6 power: supply: max14656: fix potential use-after-free
[ Upstream commit 252fbeb86c ]

Explicitly cancel/sync the irq_work delayed work, otherwise
there's a chance that it will run after the device is removed,
which would result in a use-after-free.

Note that cancel/sync should happen:
- after irq's have been disabled, as the isr re-schedules the work
- before the power supply is unregistered, because the work func
    uses the power supply handle.

Cc: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-06 13:05:39 +01:00
..
avs headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
reset treewide: convert ISO_8859-1 text comments to utf-8 2018-08-23 18:48:43 -07:00
supply power: supply: max14656: fix potential use-after-free 2019-11-06 13:05:39 +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