提交 8d06b097 编写于 作者: W Wang Wensheng 提交者: Zheng Zengkai

mm/sharepool: Accept device_id in k2u flags

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: NWang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 5cc1b791
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册