From 31fea48e3b6f8a686c3ee13cc99ec6041314b313 Mon Sep 17 00:00:00 2001 From: Tang Yizhou Date: Sat, 30 Oct 2021 11:08:59 +0800 Subject: [PATCH] share_pool: Fix compilation error of do_mm_populate() ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI CVE: NA ------------------------------------------------- do_mm_populate() should return an error number. Signed-off-by: Tang Yizhou Reviewed-by: Kefeng Wang Reviewed-by: Ding Tianhong Signed-off-by: Yang Yingliang Reviewed-by: Weilong Chen Signed-off-by: Yang Yingliang --- include/linux/mm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index e4a20206c3f3..7ee7214f17be 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2448,9 +2448,10 @@ extern int do_mm_populate(struct mm_struct *mm, unsigned long addr, unsigned lon int ignore_errors); #else static inline void mm_populate(unsigned long addr, unsigned long len) {} -int do_mm_populate(struct mm_struct *mm, unsigned long addr, unsigned long len, - int ignore_errors) +static inline int do_mm_populate(struct mm_struct *mm, unsigned long addr, + unsigned long len, int ignore_errors) { + return -EPERM; } #endif -- GitLab