mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: duoming@zju.edu.cn
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, andrew@lunn.ch,
	gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com
Subject: Re: [PATCH] ARM: mvebu: Add check in coherency.c to prevent null pointer dereference
Date: Sun, 25 Feb 2024 21:20:07 +0800 (GMT+08:00)	[thread overview]
Message-ID: <38bb64c0.1341f.18de06c41e0.Coremail.duoming@zju.edu.cn> (raw)
In-Reply-To: <Zdsky9nVdwP6Ry0E@shell.armlinux.org.uk>

On Sun, 25 Feb 2024 11:30:20 +0000 Russell King (Oracle) wrote:
> > The kzalloc() in armada_375_380_coherency_init() will return
> > null if the physical memory has run out. As a result, if we
> > dereference the property pointer, the null pointer dereference
> > bug will happen.
> > 
> > This patch adds a check to avoid null pointer dereference.
> 
> Again, what if kstrdup() fails?

Thank you for your suggestions, I will also add a check to judge
whether kstrdup() fails.

Best regards,
Duoming Zhou

  reply	other threads:[~2024-02-25 13:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25  6:04 Duoming Zhou
2024-02-25 11:30 ` Russell King (Oracle)
2024-02-25 13:20   ` duoming [this message]
2024-02-26 13:39 ` Andrew Lunn
2024-02-26 14:08   ` Russell King (Oracle)

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=38bb64c0.1341f.18de06c41e0.Coremail.duoming@zju.edu.cn \
    --to=duoming@zju.edu.cn \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@bootlin.com \
    --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®