From: Wang Wensheng wangwensheng4@huawei.com
ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5DS9S CVE: NA
-------------------------------------------------
We use device_id to select the correct dvpp vspace range when SP_DVPP flag is specified.
Signed-off-by: Wang Wensheng wangwensheng4@huawei.com Reviewed-by: Weilong Chen chenweilong@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- mm/share_pool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/share_pool.c b/mm/share_pool.c index a8266a4a7e79..087e8f8cbfb3 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -2852,10 +2852,11 @@ static int sp_k2u_prepare(unsigned long kva, unsigned long size,
trace_sp_k2u_begin(kc);
- if (sp_flags & ~SP_DVPP) { + if (sp_flags & ~SP_FLAG_MASK) { pr_err_ratelimited("k2u sp_flags %lx error\n", sp_flags); return -EINVAL; } + sp_flags &= ~SP_HUGEPAGE;
if (!current->mm) { pr_err_ratelimited("k2u: kthread is not allowed\n");