* [PATCH] virtio_pci: unregister virtio device at device remove
@ 2008-03-20 1:35 Anthony Liguori
2008-03-20 5:46 ` Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Anthony Liguori @ 2008-03-20 1:35 UTC (permalink / raw)
To: virtualization
Cc: Rusty Russell, Marcelo Tosatti, kvm-devel, linux-kernel,
Anthony Liguori
Make sure to call unregister_virtio_device() when a virtio device is removed.
Otherwise, virtio_pci.ko cannot be rmmod'd.
This was spotted by Marcelo Tosatti.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 59a8f73..6c8ecde 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -388,6 +388,7 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
{
struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
+ unregister_virtio_device(&vp_dev->vdev);
free_irq(pci_dev->irq, vp_dev);
pci_set_drvdata(pci_dev, NULL);
pci_iounmap(pci_dev, vp_dev->ioaddr);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio_pci: unregister virtio device at device remove
2008-03-20 1:35 [PATCH] virtio_pci: unregister virtio device at device remove Anthony Liguori
@ 2008-03-20 5:46 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2008-03-20 5:46 UTC (permalink / raw)
To: Anthony Liguori; +Cc: kvm-devel, Marcelo Tosatti, linux-kernel, virtualization
On Thursday 20 March 2008 12:35:04 Anthony Liguori wrote:
> Make sure to call unregister_virtio_device() when a virtio device is
> removed. Otherwise, virtio_pci.ko cannot be rmmod'd.
>
> This was spotted by Marcelo Tosatti.
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Thanks, applied.
Rusty.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-20 5:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-20 1:35 [PATCH] virtio_pci: unregister virtio device at device remove Anthony Liguori
2008-03-20 5:46 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox