summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorMyeonghun Pak <mhun512@gmail.com>2026-10-04 00:37:28 -0400
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-10-05 00:05:56 +0200
commit4856b49317ccd4ce96a0e8970df7d13ce8975a02 (patch)
treeb7f26ad17178795802216f6d47f23db60bd372e8 /rust/kernel
parentb33596a615d163372f5e7519338d860cbfc37217 (diff)
power: supply: pf1550: drain IRQ work before unregistering supplies
The VBUS work calls power_supply_changed(), but its managed cancellation is registered before the supplies. Cleanup can therefore unregister a supply while IRQ-triggered work is still pending. Commit 838767f50747 ("power: supply: pf1550: Fix use-after-free in power_supply_changed()") moved IRQ requests after supply registration, but left work cancellation before the supplies. That change protects the direct IRQ callbacks, while this fix drains the work they queue. Register the three work items after both supplies and before the IRQs. Cleanup then frees the IRQ producers, drains the work, and unregisters the supplies. The teardown ordering issue was found by static analysis. Fixes: 4b6b6433a97d ("power: supply: pf1550: add battery charger support") Cc: stable@vger.kernel.org Assisted-by: LLM Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20261004043728.1140015-1-mhun512@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions