[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.2-testing] tmem: properly drop lock on error path in do_tmem_get()


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.2-testing <patchbot@xxxxxxx>
  • Date: Wed, 26 Sep 2012 14:44:11 +0000
  • Delivery-date: Wed, 26 Sep 2012 14:44:17 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1348568174 -7200
# Node ID b4218d4791cd1ed3baa668b2a7dddb15b7186499
# Parent  61c35eaf1a88bb68816a18f2ae25dedd60f71ae0
tmem: properly drop lock on error path in do_tmem_get()

Also remove a bogus assertion.

Reported-by: Tim Deegan <tim@xxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
xen-unstable changeset: 25856:83b97a59888b
xen-unstable date: Tue Sep 11 12:18:08 UTC 2012
---


diff -r 61c35eaf1a88 -r b4218d4791cd xen/common/tmem.c
--- a/xen/common/tmem.c Tue Sep 25 12:15:01 2012 +0200
+++ b/xen/common/tmem.c Tue Sep 25 12:16:14 2012 +0200
@@ -1790,7 +1790,6 @@ static NOINLINE int do_tmem_get(pool_t *
             list_del(&pgp->us.client_eph_pages);
             
list_add_tail(&pgp->us.client_eph_pages,&client->ephemeral_page_list);
             tmem_spin_unlock(&eph_lists_spinlock);
-            ASSERT(obj != NULL);
             obj->last_client = tmh_get_cli_id_from_current();
         }
     }
@@ -1807,6 +1806,8 @@ static NOINLINE int do_tmem_get(pool_t *
     return 1;
 
 bad_copy:
+    obj->no_evict = 0;
+    tmem_spin_unlock(&obj->obj_spinlock);
     failed_copies++;
     return rc;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.