Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Changelog

[xen-unstable] x86/mm: Fix locking on hap enable failure

 

 

Xen changelog RSS feed   Index | Next | Previous | View Threaded


patchbot at xen

Apr 19, 2012, 4:00 AM

Post #1 of 1 (57 views)
Permalink
[xen-unstable] x86/mm: Fix locking on hap enable failure

# HG changeset patch
# User Andres Lagar-Cavilla <andres [at] lagarcavilla>
# 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 [at] lagarcavilla>
Acked-by: Tim Deegan <tim [at] xen>
Committed-by: Tim Deegan <tim [at] xen>
---


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 [at] lists
http://lists.xensource.com/xen-changelog

Xen changelog RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.