2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/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
ab8500_bmdata.c power: supply: ab8500: Drop AB8540/9540 support 2018-04-25 23:49:44 +02:00
ab8500_btemp.c power: supply: ab8500: Drop AB8540/9540 support 2018-04-25 23:49:44 +02:00
ab8500_charger.c power: supply: ab8500_charger: fix spelling mistake: "faile" -> "failed" 2018-05-01 13:31:38 +02:00
ab8500_fg.c power: supply: ab8500_fg: silence uninitialized variable warnings 2018-09-16 11:40:46 +02:00
abx500_chargalg.c power: supply: ab8500: Drop AB8540/9540 support 2018-04-25 23:49:44 +02:00
act8945a_charger.c power: supply: act8945a_charger: fix of_irq_get() error check 2017-07-24 14:09:00 +02:00
adp5061.c power: supply: adp5061: Fix a couple off by ones 2018-07-11 12:00:24 +02:00
apm_power.c
axp20x_ac_power.c power: supply: add AC power supply driver for AXP813 2018-12-05 18:49:32 +01:00
axp20x_battery.c power: supply: axp20x_battery: add support for AXP813 2018-03-09 16:52:33 +01:00
axp20x_usb_power.c power: supply: axp20x: add missing include bitops.h 2018-12-05 18:39:00 +01:00
axp288_charger.c power: supply: axp288: use the BIT() macro 2018-12-05 18:39:56 +01:00
axp288_fuel_gauge.c power: supply: axp288_fuel_gauge: Change to use DEFINE_SHOW_ATTRIBUTE macro 2019-01-20 22:21:45 +01:00
bq27xxx_battery_hdq.c power: supply: bq27xxx: move platform driver code into bq27xxx_battery_hdq.c 2017-07-25 15:31:21 +02:00
bq27xxx_battery_i2c.c power: supply: bq27xxx: Add support for BQ27411 2018-09-20 11:35:40 +02:00
bq27xxx_battery.c bq27x00: use cached flags 2019-02-20 00:26:38 +01:00
bq2415x_charger.c power: supply: bq2415x: fix race-condition in sysfs registration 2018-12-13 00:15:21 +01:00
bq24190_charger.c power: supply: bq24190_charger: fix race-condition in sysfs registration 2018-12-13 00:16:08 +01:00
bq24257_charger.c power: supply: bq24257: fix race-condition in sysfs registration 2018-12-13 00:16:12 +01:00
bq24735-charger.c power: supply: bq24735: remove incorrect le16_to_cpu calls 2017-06-15 16:47:35 +02:00
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 power: supply: cpcap-battery: make array cpcap_battery_irqs static, shrinks object size 2018-12-05 00:24:36 +01:00
cpcap-charger.c cpcap-charger: generate events for userspace 2019-01-20 22:40:27 +01:00
cros_usbpd-charger.c Immutable branch for mfd and power-supply for v4.20 2018-09-16 13:10:37 +02:00
da9030_battery.c
da9052-battery.c
da9150-charger.c
da9150-fg.c power: supply: da9150-fg: remove VLA usage 2018-03-12 14:34:52 +01:00
ds2760_battery.c power: supply: ds2760_battery: add devicetree probing 2018-07-11 18:09:09 +02:00
ds2780_battery.c power: supply: ds2780: switch to devm_power_supply_register 2018-12-13 00:16:47 +01:00
ds2781_battery.c power: supply: ds2781: switch to devm_power_supply_register 2018-12-13 00:16:56 +01:00
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 power: generic-adc-battery: check for duplicate properties copied from iio channels 2018-07-06 18:58:44 +02:00
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 power: supply: gpio-charger: Do not use deprecated POWER_SUPPLY_TYPE_USB_* 2018-12-13 00:17:01 +01:00
ipaq_micro_battery.c power: ipaq_micro_battery: fix alias 2016-11-23 23:44:40 +01:00
isp1704_charger.c power: supply: isp1704: switch to gpiod API 2019-01-20 21:57:43 +01:00
jz4740-battery.c
Kconfig power/supply: fix sc27xx_fuel_gauge build errors 2018-11-13 03:03:21 +01:00
lego_ev3_battery.c power: supply: lego_ev3_battery: fix Vce offset 2018-07-22 23:33:43 +02:00
lp8727_charger.c
lp8788-charger.c power: supply: lp8788: fix race-condition in sysfs registration 2018-12-13 00:16:02 +01:00
ltc2941-battery-gauge.c Merge branch 'fixes' into for-next 2018-03-12 14:35:10 +01:00
ltc3651-charger.c power: supply: ltc3651-charger: fix some error codes in probe 2017-06-08 13:05:27 +02:00
Makefile power: supply: Add Spreadtrum SC27XX fuel gauge unit driver 2018-11-09 22:55:46 +01:00
max1721x_battery.c power: supply: max1721x: fix spelling mistake "RSenese" -> "RSense" 2018-06-28 14:24:13 +02:00
max8903_charger.c
max8925_power.c power: max8925: mark expected switch fall-through 2018-10-21 21:33:35 +02:00
max8997_charger.c power: supply: maxim: Add SPDX license identifiers 2018-08-30 00:18:10 +02:00
max8998_charger.c power: supply: max8998-charger: Fix platform data retrieval 2018-09-16 13:46:39 +02:00
max14577_charger.c power: supply: maxim: Add SPDX license identifiers 2018-08-30 00:18:10 +02:00
max14656_charger_detector.c power: supply: max14656: Export I2C and OF device ID as module aliases 2017-01-29 23:15:17 +01:00
max17040_battery.c power: supply: maxim: Add SPDX license identifiers 2018-08-30 00:18:10 +02:00
max17042_battery.c max17042_battery: fix potential use-after-free on device remove 2019-02-20 00:36:52 +01:00
max77693_charger.c power: supply: maxim: Add SPDX license identifiers 2018-08-30 00:18:10 +02:00
olpc_battery.c power: supply: olpc_battery: correct the temperature units 2018-11-19 14:14:46 +01:00
pcf50633-charger.c power: supply: pcf50633: fix race-condition in sysfs registration 2018-12-13 00:16:24 +01:00
pda_power.c power: supply: pda_power: move from timer to delayed_work 2017-05-01 12:41:58 +02:00
pm2301_charger.c
pm2301_charger.h
pmu_battery.c
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 power: supply: sysfs: ratelimit property read error message 2018-09-16 11:29:18 +02:00
power_supply.h
qcom_smbb.c extcon: Split out extcon header file for consumer and provider device 2017-10-23 14:07:58 +09:00
rt5033_battery.c
rt9455_charger.c
rx51_battery.c power: supply: avoid unused twl4030-madc.h 2017-05-01 13:03:09 +02:00
s3c_adc_battery.c power: supply: s3c-adc-battery: fix driver data initialization 2018-04-26 00:12:11 +02:00
sbs-battery.c power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats 2018-06-28 14:09:46 +02:00
sbs-charger.c power: supply: sbs-charger: simplified bool function 2017-04-14 01:41:34 +02:00
sbs-manager.c power: supply: sbs-message: double left shift bug in sbsm_select() 2017-12-01 16:08:00 +01:00
sc27xx_fuel_gauge.c power: supply: sc27xx: Fix capacity saving function 2019-01-23 21:26:56 +01:00
sc2731_charger.c power: supply: sc2731_charger: Free battery information 2018-12-05 23:54:01 +01:00
smb347-charger.c
test_power.c
tosa_battery.c
tps65090-charger.c
tps65217_charger.c power: supply: tps65217: Switch to SPDX identifier. 2018-06-28 14:19:20 +02:00
twl4030_charger.c power: twl4030: fix a missing check of return value 2019-01-20 22:38:35 +01:00
twl4030_madc_battery.c power: supply: avoid unused twl4030-madc.h 2017-05-01 13:03:09 +02:00
wm97xx_battery.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
wm831x_backup.c
wm831x_power.c power: wm831x_power: Support USB charger current limit management 2017-08-15 15:05:01 +03:00
wm8350_power.c power: supply: mark expected switch fall-throughs 2018-07-23 00:10:47 +02:00
z2_battery.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00