mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Li Jun <lijun01@kylinos.cn>
Cc: gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com,
	linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm: mvebu: fix null pointer when access
Date: Wed, 18 Mar 2026 14:29:57 +0100	[thread overview]
Message-ID: <e1c5744b-a6a4-4b56-bec0-b31c4d514bc5@lunn.ch> (raw)
In-Reply-To: <20260318075324.2477118-1-lijun01@kylinos.cn>

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

      parent reply	other threads:[~2026-03-18 13:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18  7:53 Li Jun
2026-03-18  8:03 ` Russell King (Oracle)
2026-03-18 13:29 ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1c5744b-a6a4-4b56-bec0-b31c4d514bc5@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=gregory.clement@bootlin.com \
    --cc=lijun01@kylinos.cn \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=sebastian.hesselbarth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®