android_kernel_motorola_sm6375/drivers/power
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sven Van Asbroeck 03572189d6 power: supply: ltc2941-battery-gauge: fix use-after-free
commit a60ec78d306c6548d4adbc7918b587a723c555cc upstream.

This driver's remove path calls cancel_delayed_work().
However, that function does not wait until the work function
finishes. This could mean that the work function is still
running after the driver's remove function has finished,
which would result in a use-after-free.

Fix by calling cancel_delayed_work_sync(), which ensures that
that the work is properly cancelled, no longer running, and
unable to re-schedule itself.

This issue was detected with the help of Coccinelle.

Cc: stable <[email protected]>
Signed-off-by: Sven Van Asbroeck <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-02-11 04:35:24 -08:00
..
avs power: avs: smartreflex: no need to check return value of debugfs_create functions 2019-06-18 10:54:32 +02:00
reset power: reset: reboot-mode: Fix author email format 2019-09-02 21:05:59 +02:00
supply power: supply: ltc2941-battery-gauge: fix use-after-free 2020-02-11 04:35:24 -08:00
Kconfig
Makefile