* [Qemu-devel] [PATCH] Fix semaphores fallback code
@ 2012-12-28 6:00 Brad Smith
2012-12-28 20:13 ` Blue Swirl
2012-12-29 15:49 ` Blue Swirl
0 siblings, 2 replies; 4+ messages in thread
From: Brad Smith @ 2012-12-28 6:00 UTC (permalink / raw)
To: qemu-devel
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.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix semaphores fallback code
2012-12-28 6:00 [Qemu-devel] [PATCH] Fix semaphores fallback code Brad Smith
@ 2012-12-28 20:13 ` Blue Swirl
2012-12-28 21:11 ` Brad Smith
2012-12-29 15:49 ` Blue Swirl
1 sibling, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2012-12-28 20:13 UTC (permalink / raw)
To: Brad Smith; +Cc: qemu-devel
On Fri, Dec 28, 2012 at 6:00 AM, Brad Smith <brad@comstyle.com> wrote:
> 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.
Needs to be back ported to HEAD as well because of the reorganization,
or applied after Paolo's series.
>
> 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.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix semaphores fallback code
2012-12-28 20:13 ` Blue Swirl
@ 2012-12-28 21:11 ` Brad Smith
0 siblings, 0 replies; 4+ messages in thread
From: Brad Smith @ 2012-12-28 21:11 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Fri, Dec 28, 2012 at 08:13:37PM +0000, Blue Swirl wrote:
> On Fri, Dec 28, 2012 at 6:00 AM, Brad Smith <brad@comstyle.com> wrote:
> > 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.
>
> Needs to be back ported to HEAD as well because of the reorganization,
> or applied after Paolo's series.
>
> >
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > Signed-off-by: Brad Smith <brad@comstyle.com>
Here is a patch applied to HEAD.
diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c
index 6374df3..4489abf 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) {
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix semaphores fallback code
2012-12-28 6:00 [Qemu-devel] [PATCH] Fix semaphores fallback code Brad Smith
2012-12-28 20:13 ` Blue Swirl
@ 2012-12-29 15:49 ` Blue Swirl
1 sibling, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2012-12-29 15:49 UTC (permalink / raw)
To: Brad Smith; +Cc: qemu-devel
Thanks, applied.
On Fri, Dec 28, 2012 at 6:00 AM, Brad Smith <brad@comstyle.com> wrote:
> 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.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-29 15:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 6:00 [Qemu-devel] [PATCH] Fix semaphores fallback code Brad Smith
2012-12-28 20:13 ` Blue Swirl
2012-12-28 21:11 ` Brad Smith
2012-12-29 15:49 ` Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).