From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] exec.c: Initialize sa_flags passed to sigaction()
Date: Tue, 15 May 2018 20:24:08 +0100 [thread overview]
Message-ID: <871secg1t3.fsf@linaro.org> (raw)
In-Reply-To: <20180515182700.31736-1-peter.maydell@linaro.org>
Peter Maydell <peter.maydell@linaro.org> writes:
> 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>
Reviewed-by: Alex Bennée <alex.bennee@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
--
Alex Bennée
next prev parent reply other threads:[~2018-05-15 19:24 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 [this message]
2018-05-15 20:53 ` Philippe Mathieu-Daudé
2018-05-15 21:40 ` Eric Blake
2018-05-16 7:25 ` Paolo Bonzini
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=871secg1t3.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--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).