From: Al Viro <viro@zeniv.linux.org.uk>
To: cgel.zte@gmail.com
Cc: rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com,
lv.ruyi@zte.com.cn, linux-alpha@vger.kernel.org,
linux-kernel@vger.kernel.org, Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] alpha: add null pointer check
Date: Sat, 2 Apr 2022 15:45:28 +0000 [thread overview]
Message-ID: <YkhvmH/eonkrT1M1@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <20220402083436.2413189-1-lv.ruyi@zte.com.cn>
On Sat, Apr 02, 2022 at 08:34:36AM +0000, cgel.zte@gmail.com wrote:
> From: Lv Ruyi <lv.ruyi@zte.com.cn>
>
> kmalloc is a memory allocation function which can return NULL when some
> internal memory errors happen. Add null pointer check to avoid
> dereferencing null pointer.
Why is that fix correct? The only caller (module_frob_arch_sections())
has no way to tell we'd failed. _IF_ ignoring the failure is the right
thing to do, the analysis needs to be covered in commit message.
prev parent reply other threads:[~2022-04-02 15:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-02 8:34 [PATCH] alpha: add null pointer check cgel.zte
2022-04-02 15:45 ` Al Viro [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=YkhvmH/eonkrT1M1@zeniv-ca.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=cgel.zte@gmail.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.ruyi@zte.com.cn \
--cc=mattst88@gmail.com \
--cc=rth@twiddle.net \
--cc=zealci@zte.com.cn \
/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