qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>, "Corey Minyard" <cminyard@mvista.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	David Gibson <david@gibson.dropbear.id.au>,
	qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename
Date: Tue, 25 Apr 2017 08:18:43 -0500	[thread overview]
Message-ID: <d3e51a7d-b078-074c-5a2a-352e91f16c14@redhat.com> (raw)
In-Reply-To: <1493103101-25165-3-git-send-email-clg@kaod.org>

[-- Attachment #1: Type: text/plain, Size: 782 bytes --]

On 04/25/2017 01:51 AM, Cédric Le Goater wrote:
> Currenlty, the code relies on the fact that open() handles NULL
> filenames but that can cause an error with new clang:

POSIX doesn't require it to work. Linux is nice and gives you EFAULT,
but there are systems where open(NULL) crashes with SIGSEGV.  The clang
warning is correct.

> 
>   hw/core/loader.c:67:15: runtime error: null pointer passed as argument 1,
>   which is declared to never be null
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>  hw/ipmi/ipmi_bmc_sim.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Eric Blake <eblake@redhat.com>


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-04-25 13:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25  6:51 [Qemu-devel] [PATCH 0/2] ipmi: fix open() NULL argument Cédric Le Goater
2017-04-25  6:51 ` [Qemu-devel] [PATCH 1/2] tests: add IPMI tests for ppc64 Cédric Le Goater
2017-04-25  6:51 ` [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename Cédric Le Goater
2017-04-25 13:18   ` Eric Blake [this message]
2017-04-25 13:31   ` Peter Maydell
2017-04-25 14:06     ` Cédric Le Goater
2017-04-26  2:43       ` David Gibson
2017-04-26  6:41         ` Cédric Le Goater
2017-04-26  2:42   ` David Gibson
2017-04-26  6:05     ` Cédric Le Goater

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=d3e51a7d-b078-074c-5a2a-352e91f16c14@redhat.com \
    --to=eblake@redhat.com \
    --cc=clg@kaod.org \
    --cc=cminyard@mvista.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=mst@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).