]> xenbits.xensource.com Git - people/dwmw2/xen.git/commit
IOMMU/x86: fix type ref-counting race upon IOMMU page table construction
authorJan Beulich <jbeulich@suse.com>
Tue, 5 Mar 2019 12:47:36 +0000 (13:47 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 5 Mar 2019 12:47:36 +0000 (13:47 +0100)
commit1f0b0bb7773d537bcf169e021495d0986d9809fc
treeffd9806e542722be009e4e574a42ec2b1dfb3e1e
parent6d4f36c3fecc0a6a0991716199612c81d909316e
IOMMU/x86: fix type ref-counting race upon IOMMU page table construction

When arch_iommu_populate_page_table() gets invoked for an already
running guest, simply looking at page types once isn't enough, as they
may change at any time. Add logic to re-check the type after having
mapped the page, unmapping it again if needed.

This is XSA-285.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tentatively-Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/passthrough/x86/iommu.c