[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/mm: Fix locking on hap enable failure
# HG changeset patch # User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> # Date 1334752727 -3600 # Node ID 4bef0d26789c6d69c028515688f716003f6a9a85 # Parent f986e06e5f34e0d56f7d3a46120c71b029ff1e73 x86/mm: Fix locking on hap enable failure If enabling hap fails due to out of memory, the locking on the clean up path is broken. Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> Acked-by: Tim Deegan <tim@xxxxxxx> Committed-by: Tim Deegan <tim@xxxxxxx> --- diff -r f986e06e5f34 -r 4bef0d26789c xen/arch/x86/mm/hap/hap.c --- a/xen/arch/x86/mm/hap/hap.c Wed Apr 18 13:38:47 2012 +0100 +++ b/xen/arch/x86/mm/hap/hap.c Wed Apr 18 13:38:47 2012 +0100 @@ -585,13 +585,14 @@ int hap_enable(struct domain *d, u32 mod unsigned int r; paging_lock(d); r = hap_set_allocation(d, 256, NULL); - paging_unlock(d); if ( r != 0 ) { hap_set_allocation(d, 0, NULL); + paging_unlock(d); rv = -ENOMEM; goto out; } + paging_unlock(d); } /* Allow p2m and log-dirty code to borrow our memory */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |