WSL2-Linux-Kernel/fs/pstore
Jiasheng Jiang 379b120e4f pstore/platform: Add check for kstrdup
[ Upstream commit a19d48f7c5d57c0f0405a7d4334d1d38fe9d3c1c ]

Add check for the return value of kstrdup() and return the error
if it fails in order to avoid NULL pointer dereference.

Fixes: 563ca40ddf ("pstore/platform: Switch pstore_info::name to const")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20230623022706.32125-1-jiasheng@iscas.ac.cn
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:08:13 +01:00
..
Kconfig pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES 2022-12-31 13:14:45 +01:00
Makefile pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
blk.c pstore/blk: Use "%lu" to format unsigned long 2021-11-25 09:48:42 +01:00
ftrace.c ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs 2020-11-13 12:14:55 -05:00
inode.c pstore: Fix warning in pstore_kill_sb() 2021-02-23 09:27:20 -08:00
internal.h pstore: Move kmsg_bytes default into Kconfig 2020-12-01 12:09:17 -08:00
platform.c pstore/platform: Add check for kstrdup 2023-11-20 11:08:13 +01:00
pmsg.c pstore: Revert pmsg_lock back to a normal mutex 2023-05-11 23:00:31 +09:00
ram.c pstore: Properly assign mem_type property 2023-01-12 11:58:46 +01:00
ram_core.c pstore/ram: Check start of empty przs during init 2023-09-19 12:22:52 +02:00
zone.c pstore/zone: Use GFP_ATOMIC to allocate zone buffer 2023-01-12 11:58:46 +01:00