LoongArch: vDSO: Check kcalloc() result in init_vdso()
commit ac398f57 upstream. 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:Guangshuo Li <202321181@mail.sdu.edu.cn> Signed-off-by:
Huacai Chen <chenhuacai@loongson.cn> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading