WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86/shadow: unconditionally set the p2m/l

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86/shadow: unconditionally set the p2m/log-dirty allocation functions.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 17 Feb 2011 01:05:24 -0800
Delivery-date: Thu, 17 Feb 2011 01:06:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1297849685 0
# Node ID 2e70ed5e7f518a965a5075d9436ed5a835913a3c
# Parent  86000076dcee7abc6b300ceb28efeee9696d74f6
x86/shadow: unconditionally set the p2m/log-dirty allocation functions.

Otherwise enabling log-dirty mode on a PV guest that already has
a shadow allocation can leave the alloc/free functions pointers NULL,
and later try to dereference them.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 86000076dcee -r 2e70ed5e7f51 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Wed Feb 16 09:47:37 2011 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Wed Feb 16 09:48:05 2011 +0000
@@ -3337,11 +3337,11 @@ static int shadow_one_bit_enable(struct 
             sh_set_allocation(d, 0, NULL);
             return -ENOMEM;
         }
-
-        /* Allow p2m and log-dirty code to borrow shadow memory */
-        d->arch.paging.alloc_page = shadow_alloc_p2m_page;
-        d->arch.paging.free_page = shadow_free_p2m_page;
-    }
+    }
+
+    /* Allow p2m and log-dirty code to borrow shadow memory */
+    d->arch.paging.alloc_page = shadow_alloc_p2m_page;
+    d->arch.paging.free_page = shadow_free_p2m_page;
 
     if ( d->arch.paging.mode == 0 )
     {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86/shadow: unconditionally set the p2m/log-dirty allocation functions., Xen patchbot-unstable <=