On 06/22/10 - 03:33:43PM, Eric Blake wrote: > 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. Thanks, I pushed this now. -- Chris Lalancette -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list