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

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

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: default avatarSven Van Asbroeck <TheSven73@gmail.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 04fb5310
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