]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
LoongArch: vDSO: Check kcalloc() result in init_vdso()
authorGuangshuo Li <202321181@mail.sdu.edu.cn>
Thu, 18 Sep 2025 11:44:10 +0000 (19:44 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 18 Sep 2025 11:44:10 +0000 (19:44 +0800)
commitac398f570724c41e5e039d54e4075519f6af7408
tree46fcc5e8ee5a79ba7b4d3218fc1342bfea5b3639
parent677d4a52d4dc4a147d5e84af9ff207832578be70
LoongArch: vDSO: Check kcalloc() result in init_vdso()

Add a NULL-pointer check after the kcalloc() call in init_vdso(). If
allocation fails, return -ENOMEM to prevent a possible dereference of
vdso_info.code_mapping.pages when it is NULL.

Cc: stable@vger.kernel.org
Fixes: 2ed119aef60d ("LoongArch: Set correct size for vDSO code mapping")
Signed-off-by: Guangshuo Li <202321181@mail.sdu.edu.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/vdso.c