WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] fix return with the lock held

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] fix return with the lock held
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 14 Apr 2005 17:40:44 +0000
Delivery-date: Thu, 14 Apr 2005 21:03:05 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1295, 2005/04/14 18:40:44+01:00, vh249@xxxxxxxxxxxxxxxxxxxxxx

        fix return with the lock held
        
        Signed-off-by: Reiner Sailer <sailer@xxxxxxxxxx>
        Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>



 grant_table.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


diff -Nru a/xen/common/grant_table.c b/xen/common/grant_table.c
--- a/xen/common/grant_table.c  2005-04-14 17:03:14 -04:00
+++ b/xen/common/grant_table.c  2005-04-14 17:03:14 -04:00
@@ -804,18 +804,19 @@
 
     LOCK_BIGLOCK(current->domain);
 
+    rc = -EFAULT;
     switch ( cmd )
     {
     case GNTTABOP_map_grant_ref:
         if ( unlikely(!array_access_ok(
             VERIFY_WRITE, uop, count, sizeof(gnttab_map_grant_ref_t))) )
-            return -EFAULT;
+            goto out;
         rc = gnttab_map_grant_ref((gnttab_map_grant_ref_t *)uop, count);
         break;
     case GNTTABOP_unmap_grant_ref:
         if ( unlikely(!array_access_ok(
             VERIFY_WRITE, uop, count, sizeof(gnttab_unmap_grant_ref_t))) )
-            return -EFAULT;
+            goto out;
         rc = gnttab_unmap_grant_ref((gnttab_unmap_grant_ref_t *)uop, count);
         break;
     case GNTTABOP_setup_table:
@@ -831,6 +832,7 @@
         break;
     }
 
+out:
     UNLOCK_BIGLOCK(current->domain);
 
     return rc;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] fix return with the lock held, BitKeeper Bot <=