]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
memory: don't implicitly unpin for decrease-reservation
authorJan Beulich <jbeulich@suse.com>
Tue, 27 Feb 2018 13:03:27 +0000 (14:03 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 27 Feb 2018 13:03:27 +0000 (14:03 +0100)
It very likely was a mistake (copy-and-paste from domain cleanup code)
to implicitly unpin here: The caller should really unpin itself before
(or after, if they so wish) requesting the page to be removed.

This is XSA-252.

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/memory.c

index 59d23a2a98012943d4e1b5d2d66640e66ade04e8..3ed71f8f74cc802edcfa3695f8329c141a338038 100644 (file)
@@ -360,11 +360,6 @@ int guest_remove_page(struct domain *d, unsigned long gmfn)
 
     rc = guest_physmap_remove_page(d, _gfn(gmfn), mfn, 0);
 
-#ifdef _PGT_pinned
-    if ( !rc && test_and_clear_bit(_PGT_pinned, &page->u.inuse.type_info) )
-        put_page_and_type(page);
-#endif
-
     /*
      * With the lack of an IOMMU on some platforms, domains with DMA-capable
      * device must retrieve the same pfn when the hypercall populate_physmap