[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YkhvmH/eonkrT1M1@zeniv-ca.linux.org.uk>
Date: Sat, 2 Apr 2022 15:45:28 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: cgel.zte@...il.com
Cc: rth@...ddle.net, ink@...assic.park.msu.ru, mattst88@...il.com,
lv.ruyi@....com.cn, linux-alpha@...r.kernel.org,
linux-kernel@...r.kernel.org, Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] alpha: add null pointer check
On Sat, Apr 02, 2022 at 08:34:36AM +0000, cgel.zte@...il.com wrote:
> From: Lv Ruyi <lv.ruyi@....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.
Powered by blists - more mailing lists