Thread (2 messages) 2 messages, 2 authors, 2021-10-31

Re: [PATCH] power: supply: bq27xxx: Fix kernel crash on IRQ handler register error

From: Andy Shevchenko <hidden>
Date: 2021-10-31 12:58:02
Also in: linux-acpi, platform-driver-x86

On Sun, Oct 31, 2021 at 11:07 AM Hans de Goede [off-list ref] wrote:
When registering the IRQ handler fails, do not just return the error code,
this will free the devm_kalloc-ed data struct while leaving the queued
devm_kzalloc()-ed?

(main point is z/m/etc in the function name)
work queued and the registered power_supply registered with both of them
now pointing to free-ed memory, resulting in various kernel crashes
soon afterwards.

Instead properly tear-down things on IRQ handler register errors.

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help