From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/3] coroutine: Fix setup of sigaltstack coroutines
Date: Mon, 14 May 2012 17:44:15 +0200 [thread overview]
Message-ID: <1337010257-9324-2-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1337010257-9324-1-git-send-email-kwolf@redhat.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
Use pthread_kill instead of process-wide kill to invoke the signal
handler used for stack switching. This may fix spurious lock-ups with
this backend, easily triggerable by extending the time window between
kill and sigsuspend.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
coroutine-sigaltstack.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
index 7ff2d33..b2e316c 100644
--- a/coroutine-sigaltstack.c
+++ b/coroutine-sigaltstack.c
@@ -226,7 +226,7 @@ static Coroutine *coroutine_new(void)
* called.
*/
coTS->tr_called = 0;
- kill(getpid(), SIGUSR2);
+ pthread_kill(pthread_self(), SIGUSR2);
sigfillset(&sigs);
sigdelset(&sigs, SIGUSR2);
while (!coTS->tr_called) {
--
1.7.6.5
next prev parent reply other threads:[~2012-05-14 15:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 15:44 [Qemu-devel] [PULL 0/3] Block patches for 1.1 Kevin Wolf
2012-05-14 15:44 ` Kevin Wolf [this message]
2012-05-14 15:44 ` [Qemu-devel] [PATCH 2/3] qcow2: Don't ignore failure to clear autoclear flags Kevin Wolf
2012-05-14 15:44 ` [Qemu-devel] [PATCH 3/3] qemu-img: Fix segmentation fault Kevin Wolf
2012-05-14 20:09 ` [Qemu-devel] [PULL 0/3] Block patches for 1.1 Anthony Liguori
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=1337010257-9324-2-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--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 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).