From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtH3k-0003SS-2H for qemu-devel@nongnu.org; Mon, 02 Nov 2015 10:30:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtH3f-0005zC-4f for qemu-devel@nongnu.org; Mon, 02 Nov 2015 10:30:11 -0500 References: <1446473857-11934-1-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: <5637817D.9000305@redhat.com> Date: Mon, 2 Nov 2015 08:30:05 -0700 MIME-Version: 1.0 In-Reply-To: <1446473857-11934-1-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GdhDXp8dvtpFfhIA2g4X5buNEC5PXqdQo" Subject: Re: [Qemu-devel] [PATCH] pci-assign: do not test path with access() before opening List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GdhDXp8dvtpFfhIA2g4X5buNEC5PXqdQo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > Signed-off-by: Paolo Bonzini > --- > hw/i386/pci-assign-load-rom.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --GdhDXp8dvtpFfhIA2g4X5buNEC5PXqdQo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWN4F9AAoJEKeha0olJ0Nqy8QIAKuFYwoDbZiNtuoV4FF2FmCT 6JCmkkuFgtE23GeADE2XUhzRbnhnjn8K8WetC8rBfYmdurWmpdwhZAUdvndo6p1g JPoPW5wSc6wsAgd+A2cP3xdBcVtTHqVYTWlnXj2AJ/tkg96wVW4MTL9K+h7wuX8U jUC3VyeZdUjoamAH/MHaGXiEyC8bM9fpSqPHpHLZNuhjdrrRIkP8FONlN/0Ojd2j F5WjTJ5fE/61xz1tDYDqapJ3qq5WUN73ZGS+/GErW/J/UxZ4bp4kWE1zA4fV834L AOpsPkaGlmpaLCoo9Jo1Nw5h0XIB6kHBhQ/d95aZx96N56a4dAAHCLXDL3l7JYU= =gs6Q -----END PGP SIGNATURE----- --GdhDXp8dvtpFfhIA2g4X5buNEC5PXqdQo--