WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN] Add some missing put_page()s to __g

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Add some missing put_page()s to __gnttab_copy.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Aug 2006 10:00:36 +0000
Delivery-date: Mon, 14 Aug 2006 03:03:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Add some missing put_page()s to __gnttab_copy., Xen patchbot-unstable <=