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] An issue in xen_limit_pages_to_max_mfn() in Xenlinux Ver. 2.

To: jbeulich@xxxxxxxx
Subject: [Xen-devel] An issue in xen_limit_pages_to_max_mfn() in Xenlinux Ver. 2.6.18
From: Daniel Kiper <dkiper@xxxxxxxxxxxx>
Date: Thu, 10 Nov 2011 09:58:21 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx
Delivery-date: Thu, 10 Nov 2011 01:04:48 -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
User-agent: Mutt/1.3.28i
Hi Jan,

During work on kexec/kdump for Xen domU I found that
xen_limit_pages_to_max_mfn() registers undo_limit_pages()
destructor which breaks __free_pages(). When __free_pages()
is called then at beginning of this function put_page_testzero()
is called which decrements page count for given page. Later
undo_limit_pages() destructor is called which once again
calls __free_pages() and in consequence put_page_testzero()
fails (BUG_ON() is called) because page count is 0. It could
be easily fixed, however, after reviewing xen_limit_pages_to_max_mfn()
I could not find any good reason for which undo_limit_pages()
destructor is registered. Maybe it could be removed at all because
all pages are freed when __free_pages() is called and in this
case we do not care where they live. However, maybe I missed
something important. Could you explain for which cases
undo_limit_pages() destructor was prepared ???

Daniel

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