linux-sg2042/drivers/power/supply
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
..
88pm860x_battery.c
88pm860x_charger.c
Kconfig
Makefile
ab8500_bmdata.c
ab8500_btemp.c
ab8500_charger.c
ab8500_fg.c
abx500_chargalg.c
act8945a_charger.c
adp5061.c
apm_power.c
axp20x_ac_power.c
axp20x_battery.c
axp20x_usb_power.c
axp288_charger.c
axp288_fuel_gauge.c
bq27xxx_battery.c bq27x00: use cached flags 2019-02-20 00:26:38 +01:00
bq27xxx_battery_hdq.c
bq27xxx_battery_i2c.c
bq2415x_charger.c
bq24190_charger.c
bq24257_charger.c
bq24735-charger.c
bq25890_charger.c power: supply: bq25890: show max charge current/voltage as configured 2019-01-23 22:29:45 +01:00
charger-manager.c power: supply: charger-manager: Fix trivial language typos 2019-01-20 22:45:08 +01:00
collie_battery.c
cpcap-battery.c
cpcap-charger.c cpcap-charger: generate events for userspace 2019-01-20 22:40:27 +01:00
cros_usbpd-charger.c
da9030_battery.c
da9052-battery.c
da9150-charger.c
da9150-fg.c
ds2760_battery.c
ds2780_battery.c
ds2781_battery.c
ds2782_battery.c power: supply: ds2782: fix possible use-after-free on remove 2019-02-12 23:27:16 +01:00
generic-adc-battery.c
goldfish_battery.c drivers: power: supply: goldfish_battery: Add support for reading more properties 2019-01-21 22:31:27 +01:00
gpio-charger.c
ipaq_micro_battery.c
isp1704_charger.c
jz4740-battery.c
lego_ev3_battery.c
lp8727_charger.c
lp8788-charger.c
ltc2941-battery-gauge.c
ltc3651-charger.c
max1721x_battery.c
max8903_charger.c
max8925_power.c
max8997_charger.c
max8998_charger.c
max14577_charger.c
max14656_charger_detector.c
max17040_battery.c
max17042_battery.c max17042_battery: fix potential use-after-free on device remove 2019-02-20 00:36:52 +01:00
max77693_charger.c
olpc_battery.c
pcf50633-charger.c
pda_power.c
pm2301_charger.c
pm2301_charger.h
pmu_battery.c
power_supply.h
power_supply_core.c power: supply: core: Add a field to support battery max voltage 2019-02-20 00:33:08 +01:00
power_supply_leds.c
power_supply_sysfs.c
qcom_smbb.c
rt5033_battery.c
rt9455_charger.c
rx51_battery.c
s3c_adc_battery.c
sbs-battery.c
sbs-charger.c
sbs-manager.c
sc27xx_fuel_gauge.c power: supply: sc27xx: Fix capacity saving function 2019-01-23 21:26:56 +01:00
sc2731_charger.c
smb347-charger.c
test_power.c
tosa_battery.c
tps65090-charger.c
tps65217_charger.c
twl4030_charger.c power: twl4030: fix a missing check of return value 2019-01-20 22:38:35 +01:00
twl4030_madc_battery.c
wm97xx_battery.c
wm831x_backup.c
wm831x_power.c
wm8350_power.c
z2_battery.c