mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 01:51:18 +00:00
Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()
commit b512e1b077
upstream.
We should not set up further state if either mapping failed; paying
attention to just the user mapping's status isn't enough.
Also use GNTST_okay instead of implying its value (zero).
This is part of XSA-361.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: stable@vger.kernel.org
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
740f4d9d0c
commit
0c08037b56
1 changed files with 2 additions and 1 deletions
|
@ -712,7 +712,8 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
|
||||||
unsigned long mfn, pfn;
|
unsigned long mfn, pfn;
|
||||||
|
|
||||||
/* Do not add to override if the map failed. */
|
/* Do not add to override if the map failed. */
|
||||||
if (map_ops[i].status)
|
if (map_ops[i].status != GNTST_okay ||
|
||||||
|
(kmap_ops && kmap_ops[i].status != GNTST_okay))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (map_ops[i].flags & GNTMAP_contains_pte) {
|
if (map_ops[i].flags & GNTMAP_contains_pte) {
|
||||||
|
|
Loading…
Reference in a new issue