From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Duoming Zhou <duoming@zju.edu.cn>
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 11:30:19 +0000 [thread overview]
Message-ID: <Zdsky9nVdwP6Ry0E@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240225060450.53044-1-duoming@zju.edu.cn>
On Sun, Feb 25, 2024 at 02:04:50PM +0800, Duoming Zhou 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?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-02-25 11:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-25 6:04 [PATCH] ARM: mvebu: Add check in coherency.c to prevent null pointer dereference Duoming Zhou
2024-02-25 11:30 ` Russell King (Oracle) [this message]
2024-02-25 13:20 ` duoming
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=Zdsky9nVdwP6Ry0E@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=duoming@zju.edu.cn \
--cc=gregory.clement@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).