|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fix error recovery path in __gnttab_map_grant_ref
# HG changeset patch
# User Haoyu Zhang <haoyu.zhang@xxxxxxxxxx>
# Date 1328563421 28800
# Node ID 3574f4d67843733ccaabab5f8ebb859c99d7314a
# Parent 5bd5830dea13f2a80a1b9728d3e61c34661fe764
Fix error recovery path in __gnttab_map_grant_ref
In file grant_table.c function __gnttab_map_grant_ref, if
__get_paged_frame failed, the effect of _set_status previously
called should be rollback, so the flag GTF_reading and _GTF_writing
will be recovered.
Signed-off-by: Haoyu Zhang <haoyu.zhang@xxxxxxxxxx>
Signed-off-by: Liang Wang <hzwangliang.wang@xxxxxxxxxx>
Acked-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---
diff -r 5bd5830dea13 -r 3574f4d67843 xen/common/grant_table.c
--- a/xen/common/grant_table.c Mon Feb 06 13:17:46 2012 -0800
+++ b/xen/common/grant_table.c Mon Feb 06 13:23:41 2012 -0800
@@ -576,7 +576,7 @@
if ( rc != GNTST_okay )
{
gfn = INVALID_GFN;
- goto unlock_out;
+ goto unlock_out_clear;
}
act->gfn = gfn;
act->domid = ld->domain_id;
@@ -734,7 +734,8 @@
if ( op->flags & GNTMAP_host_map )
act->pin -= (op->flags & GNTMAP_readonly) ?
GNTPIN_hstr_inc : GNTPIN_hstw_inc;
-
+
+ unlock_out_clear:
if ( !(op->flags & GNTMAP_readonly) &&
!(act->pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) )
gnttab_clear_flag(_GTF_writing, status);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |