From: Greg KH <gregkh@linuxfoundation.org>
To: Mike Christie <mchristi@redhat.com>
Cc: manish.rangankar@cavium.com, target-devel@vger.kernel.org,
nab@linux-iscsi.org, kys@microsoft.com, haiyangz@microsoft.com,
sthemmin@microsoft.com, mst@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] uio: Fix uio_device memory leak
Date: Tue, 13 Jun 2017 16:01:46 +0200 [thread overview]
Message-ID: <20170613140146.GA29175@kroah.com> (raw)
In-Reply-To: <1496866004-32328-1-git-send-email-mchristi@redhat.com>
On Wed, Jun 07, 2017 at 03:06:44PM -0500, Mike Christie wrote:
> It looks like there might be 2 issues with the uio_device allocation, or it
> looks like we are leaking the device for possibly a specific type of device
> case that I could not find but one of you may know about.
>
> Issues:
> 1. We use devm_kzalloc to allocate the uio_device, but the release
> function, devm_kmalloc_release, is just a noop, so the memory is never freed.
What do you mean by this? If the release function is a noop, lots of
memory in the kernel is leaking. UIO shouldn't have to do anything
special here, is the devm api somehow broken?
If so, let's fix that, not paper over all other driver bugs by moving
the UIO code away from it :)
thanks,
greg k-h
next prev parent reply other threads:[~2017-06-13 14:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 20:06 [PATCH 1/1] uio: Fix uio_device memory leak Mike Christie
2017-06-13 14:01 ` Greg KH [this message]
2017-06-14 0:16 ` Mike Christie
2017-06-14 0:35 ` Mike Christie
2017-06-14 5:03 ` Greg KH
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=20170613140146.GA29175@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manish.rangankar@cavium.com \
--cc=mchristi@redhat.com \
--cc=mst@redhat.com \
--cc=nab@linux-iscsi.org \
--cc=sthemmin@microsoft.com \
--cc=target-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox