]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
kselftest: arm64: Add a null pointer check
authorKunwu Chan <chentao@kylinos.cn>
Tue, 23 Apr 2024 08:21:02 +0000 (16:21 +0800)
committerWill Deacon <will@kernel.org>
Sun, 28 Apr 2024 07:42:58 +0000 (08:42 +0100)
commit80164282b3620a3cb73de6ffda5592743e448d0e
treea2306bdf54251e37071d9e4421a945ccb374453b
parentb7fab1b69b9c4c152c185af8fb375810e70cb606
kselftest: arm64: Add a null pointer check

There is a 'malloc' call, which can be unsuccessful.
This patch will add the malloc failure checking
to avoid possible null dereference and give more information
about test fail reasons.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20240423082102.2018886-1-chentao@kylinos.cn
Signed-off-by: Will Deacon <will@kernel.org>
tools/testing/selftests/arm64/tags/tags_test.c