Re: [PATCH 1/2] Check for active PCI devices when doing nodedevice operations.

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

 



On 06/15/2010 06:35 AM, Chris Lalancette wrote:
> On 06/15/10 - 01:13:00PM, Daniel P. Berrange wrote:
>> You're accessing 'driver' here without first locking it
> 
> D'oh, of course.  Thanks for that.  Updated patch below.
> 
> 
>>From 56b1d0463790b52e23975968c54d4f9f9a3c5fbd Mon Sep 17 00:00:00 2001
> From: Chris Lalancette <clalance@xxxxxxxxxx>
> Date: Mon, 14 Jun 2010 17:12:35 -0400
> Subject: [PATCH v2 1/2] Check for active PCI devices when doing nodedevice operations.
> 
> In the current libvirt PCI code, there is no checking whether
> a PCI device is in use by a guest when doing node device
> detach or reattach.  This causes problems when a device is
> assigned to a guest, and the administrator starts issuing
> nodedevice commands.  Make it so that we check the list
> of active devices when trying to detach/reattach, and only
> allow the operation if the device is not assigned to a guest.
> 
> v2: Add locking to qemudNodeDeviceDettach and qemudNodeDeviceReAttach
> 
> Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
> ---
> -            pciDettachDevice(dev) < 0)
> +            pciDettachDevice(dev, driver->activePciHostdevs) < 0)

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
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

[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]