Thread (6 messages) 6 messages, 3 authors, 2021-11-02

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

From: Hans de Goede <hidden>
Date: 2021-11-02 17:58:25
Also in: linux-acpi, platform-driver-x86

Hi,

On 11/2/21 17:41, Sebastian Reichel wrote:
Hi Hans,

On Tue, Nov 02, 2021 at 03:12:51PM +0100, Hans de Goede wrote:
quoted
Hi Sebastian,

On 11/2/21 14:23, Sebastian Reichel wrote:
quoted
Hi,

On Sun, Oct 31, 2021 at 09:34:46PM +0200, Andy Shevchenko wrote:
quoted
On Sun, Oct 31, 2021 at 5:25 PM Hans de Goede [off-list ref] wrote:
quoted
When registering the IRQ handler fails, do not just return the error code,
this will free the devm_kzalloc()-ed data struct while leaving the queued
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.
FWIW,
Reviewed-by: Andy Shevchenko <redacted>
Thanks, queued.
Thank you, note these 2 patches (for the bq25980 driver) are also
pure bug-fixes, I posted them as part of a larger series, but
in hindsight I should have probably posted them separately:

https://lore.kernel.org/platform-driver-x86/20211030182813.116672-4-hdegoede@redhat.com/ (local)
https://lore.kernel.org/platform-driver-x86/20211030182813.116672-5-hdegoede@redhat.com/ (local)

It would be good if you can pick these 2 up too
(I'll respin the rest of the series to address various
review comments without them then).
Let me know if you want me to resend these 2 as a stand alone
series.
Thanks for the pointer, I queued both of them. I had to slightly
rebase, since your base did not include 172d0ccea55c. I have not
yet reviewed the remaining patchset, but considering there are more
patches to bq25890 a rebase would be ncie.
Ack, I'll rebase for the next version of that series.

Regards,

Hans
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help