[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEN] Add some missing put_page()s to __gnttab_copy.
# HG changeset patch # User ssmith@xxxxxxxxxxxxxxxxxxxxxxxxxx # Node ID eb66b68db7b10d09a3298c28b574695e73e1cf1c # Parent c0a3f670d0d6b68293ad8f48b768eebcac1bd017 [XEN] Add some missing put_page()s to __gnttab_copy. Signed-off-by: Steven Smith <sos22@xxxxxxxxx> --- xen/common/grant_table.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) diff -r c0a3f670d0d6 -r eb66b68db7b1 xen/common/grant_table.c --- a/xen/common/grant_table.c Mon Aug 14 10:45:45 2006 +0100 +++ b/xen/common/grant_table.c Mon Aug 14 10:47:59 2006 +0100 @@ -821,7 +821,7 @@ __gnttab_copy( unsigned long s_frame, d_frame; char *sp, *dp; s16 rc = GNTST_okay; - int have_d_grant = 0, have_s_grant = 0; + int have_d_grant = 0, have_s_grant = 0, have_s_ref = 0; int src_is_gref, dest_is_gref; if ( ((op->source.offset + op->len) > PAGE_SIZE) || @@ -872,6 +872,7 @@ __gnttab_copy( if ( !get_page(mfn_to_page(s_frame), sd) ) PIN_FAIL(error_out, GNTST_general_error, "could not get source frame %lx.\n", s_frame); + have_s_ref = 1; if ( dest_is_gref ) { @@ -896,7 +897,10 @@ __gnttab_copy( unmap_domain_page(dp); unmap_domain_page(sp); + put_page_and_type(mfn_to_page(d_frame)); error_out: + if ( have_s_ref ) + put_page(mfn_to_page(s_frame)); if ( have_s_grant ) __release_grant_for_copy(sd, op->source.u.ref, 1); if ( have_d_grant ) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |