Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()
authorJan Beulich <jbeulich@suse.com>
Mon, 15 Feb 2021 07:50:08 +0000 (08:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Feb 2021 14:53:24 +0000 (15:53 +0100)
commit0c08037b56a77219a6ec67c2cb19abf38722a525
tree2e5f96c3048f69f9f7c05971c99f5f79c30c54b9
parent740f4d9d0c34ea99279acf2fc99ae33c0142265a
Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()

commit b512e1b077e5ccdbd6e225b15d934ab12453b70a 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>
arch/x86/xen/p2m.c