提交 a568bf1a 编写于 作者: J Jan Beulich 提交者: Lipeng Sang

Xen/gntdev: don't ignore kernel unmapping error

stable inclusion
from stable-v5.10.153
commit a3f2cc11d6b6cd25edce81fb5b15dfcfd15f82e7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a3f2cc11d6b6cd25edce81fb5b15dfcfd15f82e7

--------------------------------

commit f28347cc upstream.

While working on XSA-361 and its follow-ups, I failed to spot another
place where the kernel mapping part of an operation was not treated the
same as the user space part. Detect and propagate errors and add a 2nd
pr_debug().
Signed-off-by: NJan Beulich <jbeulich@suse.com>
Reviewed-by: NJuergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/c2513395-74dc-aea3-9192-fd265aa44e35@suse.comSigned-off-by: NJuergen Gross <jgross@suse.com>
Signed-off-by: NDemi Marie Obenour <demi@invisiblethingslab.com>
Co-authored-by: NDemi Marie Obenour <demi@invisiblethingslab.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
上级 4b62351a
无相关合并请求
......@@ -395,6 +395,14 @@ static void __unmap_grant_pages_done(int result,
map->unmap_ops[offset+i].handle,
map->unmap_ops[offset+i].status);
map->unmap_ops[offset+i].handle = -1;
if (use_ptemod) {
WARN_ON(map->kunmap_ops[offset+i].status &&
map->kunmap_ops[offset+i].handle != -1);
pr_debug("kunmap handle=%u st=%d\n",
map->kunmap_ops[offset+i].handle,
map->kunmap_ops[offset+i].status);
map->kunmap_ops[offset+i].handle = -1;
}
}
/*
* Decrease the live-grant counter. This must happen after the loop to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册