From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Tobin C. Harding" <me@tobin.cc>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Tyrel Datwyler <tyreld@linux.vnet.ibm.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Petr Mladek <pmladek@suse.com>, Miroslav Benes <mbenes@suse.cz>,
Viresh Kumar <viresh.kumar@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: kobject_init_and_add() confusion
Date: Thu, 2 May 2019 09:19:29 +0200 [thread overview]
Message-ID: <20190502071929.GD16247@kroah.com> (raw)
In-Reply-To: <20190501215858.GE18827@eros.localdomain>
On Thu, May 02, 2019 at 07:58:58AM +1000, Tobin C. Harding wrote:
> On Wed, May 01, 2019 at 01:10:22PM +0200, Greg Kroah-Hartman wrote:
> > On Wed, May 01, 2019 at 09:38:03AM +1000, Tobin C. Harding wrote:
> > > Hi,
> > >
> > > Looks like I've created a bit of confusion trying to fix memleaks in
> > > calls to kobject_init_and_add(). Its spread over various patches and
> > > mailing lists so I'm starting a new thread and CC'ing anyone that
> > > commented on one of those patches.
> > >
> > > If there is a better way to go about this discussion please do tell me.
> > >
> > > The problem
> > > -----------
> > >
> > > Calls to kobject_init_and_add() are leaking memory throughout the kernel
> > > because of how the error paths are handled.
> >
> > s/are leaking/have the potential to leak/
> >
> > Note, no one ever hits these error paths, so it isn't a big issue, and
> > is why no one has seen this except for the use of syzbot at times.
>
> One day I'll find an important issue to fix in the kernel. At the
> moment sweeping these up is good practice/learning. If you have any
> _real_ issues that need someone to turn the crank on feel free to dump
> them on me :)
Once you get this done, I do have some "fun" ideas about the cdev api
and how it can be "fixed up".
Your knowledge of reference counts and kobjects will come in handy
there, so talk to me off-list when you are ready :)
keep up the great work,
greg k-h
next prev parent reply other threads:[~2019-05-02 7:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 23:38 kobject_init_and_add() confusion Tobin C. Harding
2019-05-01 7:54 ` Rafael J. Wysocki
2019-05-01 21:44 ` Tobin C. Harding
2019-05-10 2:35 ` Tobin C. Harding
2019-05-10 7:52 ` Rafael J. Wysocki
2019-05-10 9:40 ` Petr Mladek
2019-05-11 6:32 ` Tobin C. Harding
2019-05-01 11:10 ` Greg Kroah-Hartman
2019-05-01 21:58 ` Tobin C. Harding
2019-05-02 7:19 ` Greg Kroah-Hartman [this message]
2019-05-02 8:34 ` Petr Mladek
2019-05-02 9:06 ` Greg Kroah-Hartman
2019-05-03 1:16 ` Tobin C. Harding
2019-05-03 7:56 ` Petr Mladek
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=20190502071929.GD16247@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=me@tobin.cc \
--cc=pmladek@suse.com \
--cc=rafael@kernel.org \
--cc=tyreld@linux.vnet.ibm.com \
--cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox