Commit ac398f57 authored by Guangshuo Li's avatar Guangshuo Li Committed by Huacai Chen
Browse files

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: 2ed119ae ("LoongArch: Set correct size for vDSO code mapping")
Signed-off-by: default avatarGuangshuo Li <202321181@mail.sdu.edu.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 677d4a52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment