Messages in this thread | ![/](/images/icornerl.gif) | | Date | Sun, 12 Nov 2023 23:19:28 +0900 | Subject | Re: [PATCH] irqdesc: Fail check on early_irq_init allocation. | From | Paran Lee <> |
| |
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
| ![\](/images/icornerr.gif) |