lkml.org 
[lkml]   [2004]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] CDRW packet writing support for 2.6.7-bk13
Greg KH <greg@kroah.com> wrote:
>
> > const char *__bdevname(dev_t dev, char *buffer)
> > {
> > struct gendisk *disk;
> > int part;
> >
> > disk = get_gendisk(dev, &part);
> > if (disk) {
> > buffer = disk_name(disk, part, buffer);
> > put_disk(disk);
> > } else {
> > snprintf(buffer, BDEVNAME_SIZE, "unknown-block(%u,%u)",
> > MAJOR(dev), MINOR(dev));
> > }
> >
> > get_gendisk() did an internal module_get() in kobj_lookup().
>
> But if kobj_lookup() succeeds, module_put() is called before returning
> (actually it's always called, right?)

Oop, sorry, yes. Peter, are you sure this is where the leak is coming from?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.057 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site