[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] grant table map error 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>; Liang Wang<hzwangliang.wang@xxxxxxxxxx> diff -r cbed91e1c878 xen-4.1.2/xen/common/grant_table.c --- a/xen-4.1.2/xen/common/grant_table.c Sat Feb 04 18:36:13 2012 +0800 +++ b/xen-4.1.2/xen/common/grant_table.c Sat Feb 04 18:40:02 2012 +0800 @@ -566,7 +566,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; @@ -721,7 +721,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); Attachment:
grant_table.diff _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |