Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

From: Rusty Russell
Date: Fri Dec 05 2008 - 03:25:47 EST

On Thursday 04 December 2008 23:14:31 Mark McLoughlin wrote:
> Nothing takes a ref on virtio_pci, so even if you have
> devices in use, rmmod will attempt to unload the module.
> Fix by simply making each device take a ref on the module.

Hi Mark,

Taking a reference to oneself is almost always wrong. I'm a little
surprised that a successful call to pci_device->probe doesn't bump the
module count though.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at