Jiasheng Jiang a14cb30726 pstore/ram: Add check for kstrdup
[ Upstream commit d97038d5ec2062733c1e016caf9baaf68cf64ea1 ]

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

Fixes: e163fdb3f7f8 ("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-27 08:43:36 +02:00
..
2023-06-21 15:45:40 +02:00
2020-10-16 11:11:22 -07:00
2023-06-14 11:09:31 +02:00
2021-09-18 13:40:15 +02:00
2023-06-09 10:30:08 +02:00
2023-07-27 08:43:36 +02:00
2023-05-17 11:47:35 +02:00
2023-02-22 12:55:54 +01:00
2022-06-09 10:21:16 +02:00
2023-01-04 11:39:23 +01:00
2023-01-14 10:16:27 +01:00