Received: from eggs.gnu.org ([2001:4830:134:3::10]:37956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtaSI-00029q-2u for qemu-devel@nongnu.org; Tue, 03 Nov 2015 07:12:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtaSE-0006fR-RC for qemu-devel@nongnu.org; Tue, 03 Nov 2015 07:12:49 -0500 Message-ID: <5638A4BD.4030104@msgid.tls.msk.ru> Date: Tue, 03 Nov 2015 15:12:45 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1446473857-11934-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1446473857-11934-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 02.11.2015 17:17, 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. Applied to -trivial, thank you! /mjt