linux-stable/fs/pstore
Jiasheng Jiang f57ba91a46 pstore/ram: Add check for kstrdup
[ Upstream commit d97038d5ec ]

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

Fixes: e163fdb3f7 ("pstore/ram: Regularize prz label allocation lifetime")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230614093733.36048-1-jiasheng@iscas.ac.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:03 +02:00
..
blk.c pstore/blk: Use "%lu" to format unsigned long 2021-11-21 09:44:19 -08:00
ftrace.c pstore/ftrace: Allow immediate recording 2021-11-18 10:29:52 -08:00
inode.c pstore: Add priv field to pstore_record for backend specific use 2022-06-24 20:40:04 +02:00
internal.h pstore: Move kmsg_bytes default into Kconfig 2020-12-01 12:09:17 -08:00
Kconfig pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES 2022-12-31 13:33:08 +01:00
Makefile pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
platform.c Revert "pstore: migrate to crypto acomp interface" 2022-09-30 08:16:06 -07:00
pmsg.c pstore: Revert pmsg_lock back to a normal mutex 2023-05-11 23:03:27 +09:00
ram.c pstore: Properly assign mem_type property 2023-01-04 11:28:59 +01:00
ram_core.c pstore/ram: Add check for kstrdup 2023-07-19 16:21:03 +02:00
zone.c pstore/zone: Use GFP_ATOMIC to allocate zone buffer 2023-01-04 11:28:59 +01:00