diff options
| author | Armin Wolf <[email protected]> | 2025-06-27 20:51:24 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-07-07 12:19:51 +0000 |
| commit | d4e83784b2a9be58b938d55efb232d2751c4cab4 (patch) | |
| tree | abead8f9385135b274c7a0c9655baf6ca87a598c /rust/helpers/task.c | |
| parent | power: supply: test-power: Test access to extended power supply (diff) | |
| download | kernel-d4e83784b2a9be58b938d55efb232d2751c4cab4.tar.gz kernel-d4e83784b2a9be58b938d55efb232d2751c4cab4.zip | |
platform/x86: dell-ddv: Fix taking the psy->extensions_sem lock twice
Calling power_supply_get_property() inside
dell_wmi_ddv_battery_translate() can cause a deadlock since this
function is also being called from the power supply extension code,
in which case psy->extensions_sem is already being held.
Fix this by using the new power_supply_get_property_direct() function
to ignore any power supply extensions when retrieving the battery
serial number.
Tested on a Dell Inspiron 3505.
Reported-by: Hans de Goede <[email protected]>
Fixes: 058de163a376 ("platform/x86: dell-ddv: Implement the battery matching algorithm")
Signed-off-by: Armin Wolf <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions
