]> xenbits.xensource.com Git - xen.git/commitdiff
xen/xsm: fix incorrect handling of XSM hook return
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 2 Feb 2012 15:23:04 +0000 (15:23 +0000)
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 2 Feb 2012 15:23:04 +0000 (15:23 +0000)
If the XSM hook denied access, the execution incorrectly continued on
after an extra unlock domain.

Reported-by: John McDermott <john.mcdermott@nrl.navy.mil>
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/domctl.c

index 9c9d5d1e24a9f73f0a4b84d339b6a463b634d451..831cddaa1543be0ac66dcef287083a4cfadd6d35 100644 (file)
@@ -648,7 +648,7 @@ long arch_do_domctl(
 
         ret = xsm_machine_address_size(d, domctl->cmd);
         if ( ret )
-            rcu_unlock_domain(d);
+            goto set_machine_address_size_out;
 
         ret = -EBUSY;
         if ( d->tot_pages > 0 )