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
|