[xen stable-4.10] memory: don't implicitly unpin for decrease-reservation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen stable-4.10] memory: don't implicitly unpin for decrease-reservation

patchbot
commit 1b1c0590992d3d4a547203b124b0d130a475bc52
Author:     Jan Beulich <[hidden email]>
AuthorDate: Tue Feb 27 14:17:36 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Tue Feb 27 14:17:36 2018 +0100

    memory: don't implicitly unpin for decrease-reservation
   
    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 <[hidden email]>
    Signed-off-by: Jan Beulich <[hidden email]>
    Reviewed-by: Andrew Cooper <[hidden email]>
    master commit: d798a0952903db9d8ee0a580e03f214d2b49b7d7
    master date: 2018-02-27 14:03:27 +0100
---
 xen/common/memory.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index a6ba33f..2c2eadf 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -357,11 +357,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
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog