[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] pci-assign: do not test path with access() befo
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [PATCH] pci-assign: do not test path with access() before opening |
Date: |
Tue, 03 Nov 2015 15:12:45 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 |
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