From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1.1] coroutine: Fix setup of sigaltstack coroutines
Date: Thu, 10 May 2012 09:29:31 +0200 [thread overview]
Message-ID: <4FAB6E5B.9040101@redhat.com> (raw)
In-Reply-To: <4FAAA80F.1060806@siemens.com>
Il 09/05/2012 19:23, Jan Kiszka ha scritto:
> 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>
> ---
> 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) {
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
next prev parent reply other threads:[~2012-05-10 7:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 17:23 [Qemu-devel] [PATCH 1.1] coroutine: Fix setup of sigaltstack coroutines Jan Kiszka
2012-05-10 7:29 ` Paolo Bonzini [this message]
2012-05-10 8:07 ` Kevin Wolf
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=4FAB6E5B.9040101@redhat.com \
--to=pbonzini@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kwolf@redhat.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 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).