[PATCH] arm: mvebu: fix null pointer when access

Andrew Lunn andrew at lunn.ch
Wed Mar 18 06:29:57 PDT 2026


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



More information about the linux-arm-kernel mailing list