aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorZheng Wang <[email protected]>2023-03-09 17:47:28 +0000
committerSebastian Reichel <[email protected]>2023-03-09 23:35:20 +0000
commit47c29d69212911f50bdcdd0564b5999a559010d4 (patch)
tree5bced5242634fe592e9865c251443149bb98103a /tools/perf/scripts/python/netdev-times.py
parentpower: supply: axp288_fuel_gauge: Added check for negative values (diff)
downloadkernel-47c29d69212911f50bdcdd0564b5999a559010d4.tar.gz
kernel-47c29d69212911f50bdcdd0564b5999a559010d4.zip
power: supply: bq24190: Fix use after free bug in bq24190_remove due to race condition
In bq24190_probe, &bdi->input_current_limit_work is bound with bq24190_input_current_limit_work. When external power changed, it will call bq24190_charger_external_power_changed to start the work. If we remove the module which will call bq24190_remove to make cleanup, there may be a unfinished work. The possible sequence is as follows: CPU0 CPUc1 |bq24190_input_current_limit_work bq24190_remove | power_supply_unregister | device_unregister | power_supply_dev_release| kfree(psy) | | | power_supply_get_property_from_supplier | //use Fix it by finishing the work before cleanup in the bq24190_remove Fixes: 97774672573a ("power_supply: Initialize changed_work before calling device_add") Signed-off-by: Zheng Wang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions