qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] exec.c: Initialize sa_flags passed to sigaction()
Date: Wed, 16 May 2018 09:25:23 +0200	[thread overview]
Message-ID: <9d7f22f4-576d-2f1d-9b5c-6bf96b4ae5e0@redhat.com> (raw)
In-Reply-To: <20180515182700.31736-1-peter.maydell@linaro.org>

On 15/05/2018 20:27, Peter Maydell wrote:
> Coverity points out that in the user-only version of cpu_abort() we
> call sigaction() with a partially initialized struct sigaction
> (CID 1005351). Correct the omission.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  exec.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/exec.c b/exec.c
> index ffa1099547..bd8833fc9d 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1124,6 +1124,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...)
>          struct sigaction act;
>          sigfillset(&act.sa_mask);
>          act.sa_handler = SIG_DFL;
> +        act.sa_flags = 0;
>          sigaction(SIGABRT, &act, NULL);
>      }
>  #endif
> 

Queued, thanks.

Paolo

      parent reply	other threads:[~2018-05-16  7:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 18:27 [Qemu-devel] [PATCH] exec.c: Initialize sa_flags passed to sigaction() Peter Maydell
2018-05-15 19:24 ` Alex Bennée
2018-05-15 20:53 ` Philippe Mathieu-Daudé
2018-05-15 21:40   ` Eric Blake
2018-05-16  7:25 ` Paolo Bonzini [this message]

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=9d7f22f4-576d-2f1d-9b5c-6bf96b4ae5e0@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --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).