From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] pci-assign: do not test path with access() before opening
Date: Mon, 2 Nov 2015 08:30:05 -0700 [thread overview]
Message-ID: <5637817D.9000305@redhat.com> (raw)
In-Reply-To: <1446473857-11934-1-git-send-email-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
On 11/02/2015 07:17 AM, Paolo Bonzini wrote:
> Using access() is a time-of-check/time-of-use race condition. It is
> okay to use them to provide better error messages, but that is pretty
> much it.
>
> In this case we can get the same error from fopen(), so just use
> strerror and errno there---which actually improves the error
> message most of the time.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/i386/pci-assign-load-rom.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pci-assign: do not test path with access() before opening
Date: Mon, 2 Nov 2015 08:30:05 -0700 [thread overview]
Message-ID: <5637817D.9000305@redhat.com> (raw)
In-Reply-To: <1446473857-11934-1-git-send-email-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
On 11/02/2015 07:17 AM, Paolo Bonzini wrote:
> Using access() is a time-of-check/time-of-use race condition. It is
> okay to use them to provide better error messages, but that is pretty
> much it.
>
> In this case we can get the same error from fopen(), so just use
> strerror and errno there---which actually improves the error
> message most of the time.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/i386/pci-assign-load-rom.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-11-02 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 14:17 [Qemu-trivial] [PATCH] pci-assign: do not test path with access() before opening Paolo Bonzini
2015-11-02 14:17 ` [Qemu-devel] " Paolo Bonzini
2015-11-02 15:30 ` Eric Blake [this message]
2015-11-02 15:30 ` Eric Blake
2015-11-03 12:12 ` [Qemu-trivial] " Michael Tokarev
2015-11-03 12:12 ` [Qemu-devel] " Michael Tokarev
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=5637817D.9000305@redhat.com \
--to=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.