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 <[email protected]>
> 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 <[email protected]>
> ---
> -            pciDettachDevice(dev) < 0)
> +            pciDettachDevice(dev, driver->activePciHostdevs) < 0)

ACK.

-- 
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to