lkml.org 
[lkml]   [2008]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] virtio: make PCI devices take a virtio_pci module ref
On Fri, Dec 05, 2008 at 04:25:31PM +0100, Jiri Slaby wrote:
> Mark McLoughlin wrote:
> >> Fix the virtio bus instead.
> >
> > Yeah, the patch I posted wasn't meant as a fix for this traceback.
>
> So what's the module_get patch needed for?
>
> > Here's one that does fix it.
> ...
> > From: Mark McLoughlin <markmc@redhat.com>
> > Subject: [PATCH] virtio: add device release() function
> >
> > Add a release() function for virtio_pci devices so as to avoid:
> >
> > Device 'virtio0' does not have a release() function, it is broken and must be fixed

Just providing an empty release function to the kernel is the complete
wrong thing. Do you not think the kernel is actually trying to tell you
something here? If it could test for an empty release function it would
complain about that as well, providing one is no "fix" at all.

You need to free your memory in the release function that is owned by
the device/structure. Please read the file, Documentation/kobject.txt
for details as to what you need to do.

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-12-05 16:33    [from the cache]
©2003-2011 Jasper Spaans