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

From: Jiri Slaby
Date: Thu Dec 04 2008 - 17:52:18 EST

On 12/04/2008 01:44 PM, 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.

It unbinds the device properly as any other driver. So what's the problem here?

> Fix by simply making each device take a ref on the module.
> Signed-off-by: Mark McLoughlin <markmc@xxxxxxxxxx>
> Reported-by: Michael Tokarev <mjt@xxxxxxxxxx>
> ---
> drivers/virtio/virtio_pci.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
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