Re: [PATCH] arm: mvebu: fix null pointer when access
From: Andrew Lunn
Date: Wed Mar 18 2026 - 09:31:51 EST
On Wed, Mar 18, 2026 at 03:53:24PM +0800, Li Jun wrote:
> the kzalloc may return null pointer, will cause kernel panic.
The kernel is a dead man walking if the memory allocation fails, so
that coherency cannot be configured correctly. A panic at least gives
a stack trace, rather than a nearly undebuggable deadlock later on.
Not all kernel panics are bad. You need to look at the context, the
comments in the code.
Andrew