[xen master] mm: don't poison a page if scrub_debug is off

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

[xen master] mm: don't poison a page if scrub_debug is off

patchbot
commit f65bf735f17235c5077c83550259cacf4090b28b
Author:     Boris Ostrovsky <[hidden email]>
AuthorDate: Fri Sep 1 11:06:03 2017 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Fri Sep 1 11:06:03 2017 +0200

    mm: don't poison a page if scrub_debug is off
   
    If scrub_debug is off we don't check pages in check_one_page().
    Thus there is no reason to ever poison them.
   
    Signed-off-by: Boris Ostrovsky <[hidden email]>
    Reviewed-by: Wei Liu <[hidden email]>
---
 xen/common/page_alloc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 2c7675b..2b8bb95 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -714,6 +714,9 @@ static void poison_one_page(struct page_info *pg)
     mfn_t mfn = _mfn(page_to_mfn(pg));
     uint64_t *ptr;
 
+    if ( !scrub_debug )
+        return;
+
     ptr = map_domain_page(mfn);
     *ptr = ~SCRUB_PATTERN;
     unmap_domain_page(ptr);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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