direct-io.hg

changeset 4523:b0422f2ab81d

bitkeeper revision 1.1295 (425eab1cIikVxIVyd1yoZpti7rBCLA)

fix return with the lock held

Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vh249@arcadians.cl.cam.ac.uk
date Thu Apr 14 17:40:44 2005 +0000 (2005-04-14)
parents d56c3246d889
children 5517afc58cf9
files xen/common/grant_table.c
line diff
     1.1 --- a/xen/common/grant_table.c	Wed Apr 13 22:39:01 2005 +0000
     1.2 +++ b/xen/common/grant_table.c	Thu Apr 14 17:40:44 2005 +0000
     1.3 @@ -804,18 +804,19 @@ do_grant_table_op(
     1.4  
     1.5      LOCK_BIGLOCK(current->domain);
     1.6  
     1.7 +    rc = -EFAULT;
     1.8      switch ( cmd )
     1.9      {
    1.10      case GNTTABOP_map_grant_ref:
    1.11          if ( unlikely(!array_access_ok(
    1.12              VERIFY_WRITE, uop, count, sizeof(gnttab_map_grant_ref_t))) )
    1.13 -            return -EFAULT;
    1.14 +            goto out;
    1.15          rc = gnttab_map_grant_ref((gnttab_map_grant_ref_t *)uop, count);
    1.16          break;
    1.17      case GNTTABOP_unmap_grant_ref:
    1.18          if ( unlikely(!array_access_ok(
    1.19              VERIFY_WRITE, uop, count, sizeof(gnttab_unmap_grant_ref_t))) )
    1.20 -            return -EFAULT;
    1.21 +            goto out;
    1.22          rc = gnttab_unmap_grant_ref((gnttab_unmap_grant_ref_t *)uop, count);
    1.23          break;
    1.24      case GNTTABOP_setup_table:
    1.25 @@ -831,6 +832,7 @@ do_grant_table_op(
    1.26          break;
    1.27      }
    1.28  
    1.29 +out:
    1.30      UNLOCK_BIGLOCK(current->domain);
    1.31  
    1.32      return rc;