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-devel

[Xen-devel] [PATCH] Small fix for shadow_remove_all_access_in_page

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Small fix for shadow_remove_all_access_in_page
From: Michael Vrable <mvrable@xxxxxxxxxxx>
Date: Mon, 12 Sep 2005 19:38:45 -0700
Delivery-date: Tue, 13 Sep 2005 02:36:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
Here's a fairly simple patch to correct a bug I hit when experimenting
with VM forking earlier.  Let me know if there's anything wrong with the
changeset; this is the first time I've tried exporting a changeset from
Mercurial.

--Michael Vrable


# HG changeset patch
# User Michael Vrable <mvrable@xxxxxxxxxxx>
# Node ID df9609e384a4a819a69d01556b8231b842b04050
# Parent  d8637529dafff3c610e4bb31349d4ae00a23a18e
Fix a bug in shadow_remove_all_access_in_page.

Fixes a fairly obvious bug, in which an if statement was reversed.  The
bug has been present for a while, so apparently this code isn't well
tested.

Signed-off-by: Michael Vrable <mvrable@xxxxxxxxxxx>

diff -r d8637529daff -r df9609e384a4 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c   Mon Sep 12 21:42:26 2005
+++ b/xen/arch/x86/shadow32.c   Tue Sep 13 02:00:19 2005
@@ -2226,7 +2226,7 @@
     
     for (i = 0; i < L1_PAGETABLE_ENTRIES; i++)
     {
-        if ( unlikely(!l1e_has_changed(pl1e[i], match, flags) == 0) )
+        if ( unlikely(!l1e_has_changed(pl1e[i], match, flags)) )
         {
             l1_pgentry_t ol2e = pl1e[i];
             pl1e[i] = l1e_empty();
diff -r d8637529daff -r df9609e384a4 xen/arch/x86/shadow_public.c
--- a/xen/arch/x86/shadow_public.c      Mon Sep 12 21:42:26 2005
+++ b/xen/arch/x86/shadow_public.c      Tue Sep 13 02:00:19 2005
@@ -1634,7 +1634,7 @@
 
     for (i = 0; i < L1_PAGETABLE_ENTRIES; i++)
     {
-        if ( unlikely(!l1e_has_changed(pl1e[i], match, flags) == 0) )
+        if ( unlikely(!l1e_has_changed(pl1e[i], match, flags)) )
         {
             l1_pgentry_t ol2e = pl1e[i];
             pl1e[i] = l1e_empty();

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

<Prev in Thread] Current Thread [Next in Thread>