Re: [libvirt] [PATCH] Fix race condition in qemuGetProcessInfo

2014-12-01 Thread Eric Blake
On 12/01/2014 01:24 PM, Eduardo Costa wrote: Thanks for forwarding to the list. I'll modify the commit message to include a reference to https://bugzilla.redhat.com/show_bug.cgi?id=1169055 where you first posted this. > There is a race condition between the fopen and fscanf calls > in qemuGetPr

[libvirt] [PATCH] Fix race condition in qemuGetProcessInfo

2014-12-01 Thread Eduardo Costa
There is a race condition between the fopen and fscanf calls in qemuGetProcessInfo. If fopen succeeds, there is a small possibility that the file no longer exists before reading from it. Now, if either fopen or fscanf calls fail, the function will behave just as only fopen had failed. --- src/qemu