|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/mem_sharing: Fix saved mfns stat for failed unsharing
# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1335430988 -3600
# Node ID 12bc6abfc2649b73d8966c869c207b9e9f67edb0
# Parent e06850161b7f5b90027a9e7e894a61085226e809
x86/mem_sharing: Fix saved mfns stat for failed unsharing
If unsharing fails, the decrease of the nr_saved_mfns stat was not being
undone. This would result in an underflow of the stat, as the retry would later
decrease the counter again.
Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
---
diff -r e06850161b7f -r 12bc6abfc264 xen/arch/x86/mm/mem_sharing.c
--- a/xen/arch/x86/mm/mem_sharing.c Thu Apr 26 10:03:08 2012 +0100
+++ b/xen/arch/x86/mm/mem_sharing.c Thu Apr 26 10:03:08 2012 +0100
@@ -997,6 +997,8 @@ gfn_found:
page = alloc_domheap_page(d, 0);
if ( !page )
{
+ /* Undo dec of nr_saved_mfns, as the retry will decrease again. */
+ atomic_inc(&nr_saved_mfns);
mem_sharing_page_unlock(old_page);
put_gfn(d, gfn);
/* Caller is responsible for placing an event
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |