* [PATCH] x86/mm: Fix locking on hap enable failure
@ 2012-04-13 21:18 Andres Lagar-Cavilla
2012-04-18 12:40 ` Tim Deegan
0 siblings, 1 reply; 2+ messages in thread
From: Andres Lagar-Cavilla @ 2012-04-13 21:18 UTC (permalink / raw)
To: xen-devel; +Cc: andres, tim
xen/arch/x86/mm/hap/hap.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
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@lagarcavilla.org>
diff -r 8ec52231c03d -r 15a3c740419f xen/arch/x86/mm/hap/hap.c
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/mm: Fix locking on hap enable failure
2012-04-13 21:18 [PATCH] x86/mm: Fix locking on hap enable failure Andres Lagar-Cavilla
@ 2012-04-18 12:40 ` Tim Deegan
0 siblings, 0 replies; 2+ messages in thread
From: Tim Deegan @ 2012-04-18 12:40 UTC (permalink / raw)
To: Andres Lagar-Cavilla; +Cc: andres, xen-devel
At 17:18 -0400 on 13 Apr (1334337486), Andres Lagar-Cavilla wrote:
> xen/arch/x86/mm/hap/hap.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
>
> 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@lagarcavilla.org>
Applied, thanks.
Tim.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-18 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 21:18 [PATCH] x86/mm: Fix locking on hap enable failure Andres Lagar-Cavilla
2012-04-18 12:40 ` Tim Deegan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.