From: Greg KH <greg@kroah.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Greg KH <gregkh@suse.de>, linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH v2] Fix "notes" kobject leak
Date: Tue, 23 Sep 2008 13:56:40 -0700 [thread overview]
Message-ID: <20080923205640.GA17785@kroah.com> (raw)
In-Reply-To: <20080923195111.GA22247@x200.localdomain>
On Tue, Sep 23, 2008 at 11:51:11PM +0400, Alexey Dobriyan wrote:
> > > > > --- a/kernel/module.c
> > > > > +++ b/kernel/module.c
> > > > > @@ -1174,6 +1174,7 @@ static void free_notes_attrs(struct module_notes_attrs *notes_attrs,
> > > > > sysfs_remove_bin_file(notes_attrs->dir,
> > > > > ¬es_attrs->attrs[i]);
> > > > > kobject_del(notes_attrs->dir);
> > > > > + kobject_put(notes_attrs->dir);
> > > >
> > > > Hm, no, that should just be a call to kobject_put() instead of
> > > > kobject_del(), can you try that instead and see if that solves the issue
> > > > (am at a conference and can't test that at the moment, sorry.)
> > >
> > > Why?! kobject_del() puts parent kobject.
> >
> > And that's about it (well, it also tears down the sysfs stuff.)
> >
> > If you call kobject_put() instead, and it's the last put, it will also
> > call kobject_del() and do everything else that it needs to do.
> >
> > Try it and let me know if I'm right or not :)
>
> OK, this works too.
>
>
> [PATCH v2] Fix "notes" kobject leak
Great, thanks for testing, I'll apply this to my trees.
greg k-h
prev parent reply other threads:[~2008-09-23 20:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 4:42 kobject leak in next-20080829 Alexey Dobriyan
2008-08-30 5:43 ` Greg KH
2008-09-06 5:45 ` kobject leak in next-20080829 (and mainline) Alexey Dobriyan
2008-09-12 15:51 ` Greg KH
2008-09-14 8:42 ` [PATCH] Fix "notes" kobject leak Alexey Dobriyan
2008-09-15 22:53 ` Greg KH
2008-09-15 23:35 ` Alexey Dobriyan
2008-09-15 23:40 ` Greg KH
2008-09-23 19:51 ` [PATCH v2] " Alexey Dobriyan
2008-09-23 20:56 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080923205640.GA17785@kroah.com \
--to=greg@kroah.com \
--cc=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.