Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 252fbeb8 authored by Sven Van Asbroeck's avatar Sven Van Asbroeck Committed by Sebastian Reichel
Browse files

power: supply: max14656: fix potential use-after-free



Explicitly cancel/sync the irq_work delayed work, otherwise
there's a chance that it will run after the device is removed,
which would result in a use-after-free.

Note that cancel/sync should happen:
- after irq's have been disabled, as the isr re-schedules the work
- before the power supply is unregistered, because the work func
    uses the power supply handle.

Cc: Alexander Kurz <akurz@blala.de>
Signed-off-by: default avatarSven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 0cd0e497
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment