On 11/26/2013 10:19 AM, Michal Privoznik wrote: > On 25.11.2013 22:49, Eric Blake wrote: >> Commit 348b4e2 introduced a potential problem (thankfully not >> in any release): we are attempting to use virFileReadHeaderFD() >> on a file that was opened with O_NONBLOCK. While this >> shouldn't be a problem in practice (because O_NONBLOCK >> typically doesn't affect regular or block files, and fifos and >> sockets cannot be storage volumes), it's better to play it safe >> to avoid races from opening an unexpected file type while also >> avoiding problems with having to handle EAGAIN while read()ing. >> >> Based on a report by Dan Berrange. >> >> * src/storage/storage_backend.c >> (virStorageBackendVolOpenCheckMode): Fix up fd after avoiding race. >> >> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> >> --- >> src/storage/storage_backend.c | 25 +++++++++++++++++++++---- >> 1 file changed, 21 insertions(+), 4 deletions(-) > > ACK Thanks; pushed. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list