]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/xen: Add some null pointer checking to smp.c
authorKunwu Chan <chentao@kylinos.cn>
Fri, 19 Jan 2024 09:49:48 +0000 (17:49 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:10 +0000 (18:19 -0400)
commita9bbb05c0c04b49a1f7f05fd03826321dca2b8d4
tree685aa6d647a23094b34f3983ca91c37c25f70ad5
parent994aecb412f2cfc134b6793409e9f6f217140628
x86/xen: Add some null pointer checking to smp.c

[ Upstream commit 3693bb4465e6e32a204a5b86d3ec7e6b9f7e67c2 ]

kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful
by checking the pointer validity.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401161119.iof6BQsf-lkp@intel.com/
Suggested-by: Markus Elfring <Markus.Elfring@web.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20240119094948.275390-1-chentao@kylinos.cn
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/xen/smp.c