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] linux-2.6.18/x86: undo_limit_pages() must reset page

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux-2.6.18/x86: undo_limit_pages() must reset page count
From: "Jan Beulich" <JBeulich@xxxxxxxx>
Date: Thu, 10 Nov 2011 11:05:19 +0000
Cc: Daniel Kiper <dkiper@xxxxxxxxxxxx>
Delivery-date: Thu, 10 Nov 2011 03:20:01 -0800
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
... before calling __free_pages() as it is already being called in the
context of that or similar function (which used put_page_test_zero()
first or otherwise assumes the page count is zero).

Reported-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/arch/i386/mm/hypervisor.c
+++ b/arch/i386/mm/hypervisor.c
@@ -437,6 +437,7 @@ static void undo_limit_pages(struct page
        BUG_ON(order > max_contig_order);
        xen_limit_pages_to_max_mfn(pages, order, 0);
        ClearPageForeign(pages);
+       init_page_count(pages);
        __free_pages(pages, order);
 }
 



Attachment: xen-x86-undo-limit-pages.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux-2.6.18/x86: undo_limit_pages() must reset page count, Jan Beulich <=