Re: [PATCH] Fix a potential race in pciInitDevice.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/28/10 - 02:39:38PM, Chris Wright wrote:
> * Chris Lalancette (clalance@xxxxxxxxxx) wrote:
> > If detecting the FLR flag of a pci device fails, then we
> > could run into the situation of trying to close a file
> > descriptor twice, once in pciInitDevice() and once in pciFreeDevice().
> > Fix that by removing the pciCloseConfig() in pciInitDevice() and
> > just letting pciFreeDevice() handle it.
> > 
> > Thanks to Chris Wright for pointing out this problem.
> > 
> > While we are at it, fix an error check.  While it would actually
> > work as-is (since success returns 0), it's still more clear to
> > check for < 0 (as the rest of the code does).
> > 
> > Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>

Thanks, I've pushed this patch.

--
Chris Lalancette

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]