android_kernel_samsung_a7y1.../drivers/power
Sven Van Asbroeck 76ddcf5b5e 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 <stable@vger.kernel.org>
Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 13:49:57 +02:00
..
avs PM / AVS: SmartReflex: NULL check before some freeing functions is not needed 2020-04-07 12:41:14 +02:00
reset A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
88pm860x_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
88pm860x_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ab8500_bmdata.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ab8500_btemp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ab8500_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ab8500_fg.c power: supply: ab8500_fg: silence uninitialized variable warnings 2020-04-07 12:27:54 +02:00
abx500_chargalg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
apm_power.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
axp20x_usb_power.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
axp288_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
axp288_fuel_gauge.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bq27xxx_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bq2415x_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bq24190_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bq24257_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bq24735-charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bq25890_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
charger-manager.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
collie_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
da9030_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
da9052-battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
da9150-charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
da9150-fg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ds2760_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ds2780_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ds2781_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ds2782_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
generic-adc-battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
goldfish_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gpio-charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel_mid_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ipaq_micro_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
isp1704_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
jz4740-battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lp8727_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lp8788-charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ltc2941-battery-gauge.c power: supply: ltc2941-battery-gauge: fix use-after-free 2020-04-07 13:49:57 +02:00
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
max8903_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
max8925_power.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
max8997_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
max8998_charger.c power: supply: max8998-charger: Fix platform data retrieval 2020-04-07 12:28:02 +02:00
max14577_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
max17040_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
max17042_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
max77693_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
olpc_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcf50633-charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pda_power.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pm2301_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pm2301_charger.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pmu_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
power_supply_core.c power: supply: Init device wakeup after device_add() 2020-04-07 13:43:05 +02:00
power_supply_leds.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
power_supply_sysfs.c power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG 2020-04-06 18:14:39 +02:00
power_supply.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
qcom_smbb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rt5033_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rt9455_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rx51_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s3c_adc_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sbs-battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
smb347-charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_power.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tosa_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tps65090-charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tps65217_charger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
twl4030_charger.c power: supply: twl4030_charger: disable eoc interrupt on linear charge 2020-04-07 12:28:42 +02:00
twl4030_madc_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wm97xx_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wm831x_backup.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wm831x_power.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wm8350_power.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
z2_battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30