From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nvmem: core: Prevent memory leak when device is unregistered
Date: Wed, 17 May 2017 12:10:28 +0300 [thread overview]
Message-ID: <20170517091028.GB11602@lahna.fi.intel.com> (raw)
In-Reply-To: <CAHQ1cqE-+-_96tmAONkfM4+Rx5K=ODOD9NuWOZsPE=suvDUGBg@mail.gmail.com>
On Tue, May 16, 2017 at 02:33:55PM -0700, Andrey Smirnov wrote:
> On Mon, May 15, 2017 at 4:13 AM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > The nvmem_unregister() calls device_del() for the device but forgets to
> > call put_device() to actually release the device object which causes
> > that memory to be leaked.
> >
> > Fix this by calling device_unregister() for the device intead which also
> > calls put_device() for the device releasing it eventually.
> >
> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > ---
>
> FWIW, I submitted similar fix for this here:
>
> lkml.kernel.org/r/20170418142454.23921-2-andrew.smirnov@gmail.com
Cool, let's go with that one instead then :)
prev parent reply other threads:[~2017-05-17 9:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 11:13 Mika Westerberg
2017-05-15 12:48 ` Andy Shevchenko
2017-05-16 13:45 ` Johan Hovold
2017-05-16 21:33 ` Andrey Smirnov
2017-05-17 9:10 ` Mika Westerberg [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=20170517091028.GB11602@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andrew.smirnov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@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
all inboxes | Powered by JetHome®