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

[Xen-changelog] [qemu-upstream-unstable] Fix semaphores fallback code



commit 0a7ad69a0f012d5d70142f775f99405500d4d38e
Author:     Brad Smith <brad@xxxxxxxxxxxx>
AuthorDate: Fri Dec 28 01:00:26 2012 -0500
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Mon Jan 14 15:36:28 2013 -0600

    Fix semaphores fallback code
    
    As reported in bug 1087114 the semaphores fallback code is broken which
    results in QEMU crashing and making QEMU unusable.
    
    This patch is from Paolo.
    
    This needs to be back ported to the 1.3 stable tree as well.
    
    Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Signed-off-by: Brad Smith <brad@xxxxxxxxxxxx>
    Signed-off-by: Blue Swirl <blauwirbel@xxxxxxxxx>
    (cherry picked from commit a795ef8dcb8cbadffc996c41ff38927a97645234)
    
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 qemu-thread-posix.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c
index 4ef9c7b..9a3885f 100644
--- a/qemu-thread-posix.c
+++ b/qemu-thread-posix.c
@@ -213,6 +213,7 @@ int qemu_sem_timedwait(QemuSemaphore *sem, int ms)
     while (sem->count < 0) {
         rc = pthread_cond_timedwait(&sem->cond, &sem->lock, &ts);
         if (rc == ETIMEDOUT) {
+            ++sem->count;
             break;
         }
         if (rc != 0) {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
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®.