lkml.org 
[lkml]   [2023]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] irqdesc: Fail check on early_irq_init allocation.
On Sat, 11 Nov 2023 17:00:36 +0000,
Paran Lee <p4ranlee@gmail.com> wrote:
>
> When doing start_kernel(),
> On early_irq_init(), alloc_desc() or alloc_percpu()
> may be fails. So, Explicit fail check needed on dynamic allocation.

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.

--
Without deviation from the norm, progress is not possible.

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