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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 31, 2021 at 11:07 AM Hans de Goede <hdegoede@xxxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux