From: Brad Smith <brad@comstyle.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix semaphores fallback code
Date: Fri, 28 Dec 2012 01:00:26 -0500 [thread overview]
Message-ID: <20121228060022.GB27232@rox.home.comstyle.com> (raw)
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@redhat.com>
Signed-off-by: Brad Smith <brad@comstyle.com>
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
index 7be292e..17f2d7c 100644
--- a/util/qemu-thread-posix.c
+++ b/util/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) {
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
next reply other threads:[~2012-12-28 6:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-28 6:00 Brad Smith [this message]
2012-12-28 20:13 ` [Qemu-devel] [PATCH] Fix semaphores fallback code Blue Swirl
2012-12-28 21:11 ` Brad Smith
2012-12-29 15:49 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121228060022.GB27232@rox.home.comstyle.com \
--to=brad@comstyle.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.