[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.1-testing] Fix error recovery path in __gnttab_map_grant_ref
# HG changeset patch # User Haoyu Zhang <haoyu.zhang@xxxxxxxxxx> # Date 1331108993 0 # Node ID d4ae43e71dcfd6142b1178e993a3ee3f3f550a9a # Parent 871ed74bbefd969459294ce4f5e9df99eeae2400 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> xen-unstable changeset: 24701:3574f4d67843 xen-unstable date: Mon Feb 06 13:23:41 2012 -0800 --- diff -r 871ed74bbefd -r d4ae43e71dcf xen/common/grant_table.c --- a/xen/common/grant_table.c Wed Mar 07 08:26:25 2012 +0000 +++ b/xen/common/grant_table.c Wed Mar 07 08:29:53 2012 +0000 @@ -567,7 +567,7 @@ gfn = sha1 ? sha1->frame : sha2->full_page.frame; rc = __get_paged_frame(gfn, &frame, !!(op->flags & GNTMAP_readonly), rd); if ( rc != GNTST_okay ) - goto unlock_out; + goto unlock_out_clear; act->gfn = gfn; act->domid = ld->domain_id; act->frame = frame; @@ -722,7 +722,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@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |