lkml.org 
[lkml]   [2023]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] irqdesc: Fail check on early_irq_init allocation.
From


On 2023-11-12 오후 11:00, Marc Zyngier wrote:

Thanks for the code review Marc!

I think function alloc_descs() in irqdesc.c has also alloc_desc() fail
handling, and there's kernel-wide code consistency checking for
allocation failures, and I thought it would be nice to mark it.
So that the code is aware of it.

Even if it panics with a null derefence reference.

> A failing allocation already results in a massive splat describing how
> the allocation failed. Further use of the NULL pointer will also
> result in a terminal oops, particularly if this happens this early in
> the boot sequence.
>
> So what do these BUG_ON() calls buy us?
>
> M.
>

If anyone has any ideas on how to get a little fancier with the allocation,
I'll send a v2 patch in that direction.

BR
Paran Lee

\
 
 \ /
  Last update: 2023-11-20 13:57    [W:0.063 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site