Re: [PATCH v2 0/3] power: supply: fix work-vs-devres teardown use-after-free

From: Sebastian Reichel

Date: Sun Nov 15 2026 - 19:09:17 EST



On Mon, 09 Nov 2026 13:42:09 +0900, hyunjungg wrote:
> From: Hyunjung Ko <hj351016@xxxxxxxxx>
>
> Three power-supply drivers register a poll/detect work for devm
> cancellation before devm_power_supply_register(). devres unwinds in
> reverse, so on unbind the power supply is freed before the work is
> cancelled, and the work's power_supply_changed() then dereferences the
> freed supply. Each patch moves the devm work-cancel registration to after
> devm_power_supply_register() so teardown drains the work first. No
> functional change.
>
> [...]

Applied, thanks!

[1/3] power: supply: ltc2941: drain poll work before unregistering the supply
commit: 001fc38da1802cfc4b54fd1141594e5c8dc83893
[2/3] power: supply: axp20x_usb_power: drain vbus_detect work before unregistering the supply
commit: 4dbc2b7a52a6023508cd424e83487588ed5138f3
[3/3] power: supply: mt6360_charger: drain chrdet_work before unregistering the supply
commit: 6a40d8459e2385b5d0bdb8832c0bce7f87a55823

Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>