diff options
author | Lv Ruyi <lv.ruyi@zte.com.cn> | 2022-03-29 13:40:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 15:24:12 +0300 |
commit | 5b422da35c15a3835be731c98c6dbfb9c5072d41 (patch) | |
tree | 34dae145d23f77bed26769569750db03fc0569b4 /fs/nls | |
parent | f78f56488cd3738f2fa86e93b9af7671648582f6 (diff) | |
download | linux-5b422da35c15a3835be731c98c6dbfb9c5072d41.tar.xz |
proc: bootconfig: Add null pointer check
commit bed5b60bf67ccd8957b8c0558fead30c4a3f5d3f upstream.
kzalloc is a memory allocation function which can return NULL when some
internal memory errors happen. It is safer to add null pointer check.
Link: https://lkml.kernel.org/r/20220329104004.2376879-1-lv.ruyi@zte.com.cn
Cc: stable@vger.kernel.org
Fixes: c1a3c36017d4 ("proc: bootconfig: Add /proc/bootconfig to show boot config list")
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nls')
0 files changed, 0 insertions, 0 deletions