lkml.org 
[lkml]   [2008]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] virtio: make PCI devices take a virtio_pci module ref
Date
On Thursday, December 04, 2008 4:13 pm Rusty Russell wrote:
> 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.
>
> Jesse?

Looks like the PCI bus type's probe function does take a device reference,
which should get called from driver_register when the driver calls
pci_register_driver... Is that not happening in the virtio case?

--
Jesse Barnes, Intel Open Source Technology Center


\
 
 \ /
  Last update: 2008-12-09 23:29    [W:0.191 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site