From: Ming Lei <tom.leiming@gmail.com>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org, catalin.marinas@arm.com,
dwmw2@infradead.org, kay.sievers@vrfy.org,
Ming Lei <tom.leiming@gmail.com>
Subject: Re: [PATCH] driver core:firmware_class:fix memory leak of page pointers array
Date: Thu, 9 Jul 2009 08:20:48 +0800 [thread overview]
Message-ID: <d82e647a0907081720v438344fcj1b37e0e226818632@mail.gmail.com> (raw)
In-Reply-To: <1247098591-4887-1-git-send-email-tom.leiming@gmail.com>
2009/7/9 <tom.leiming@gmail.com>:
> From: Ming Lei <tom.leiming@gmail.com>
>
> The page pointers array is allocated in fw_realloc_buffer() called by
> firmware_data_write(), and should be freed in release function of firmware
> device.
>
> Signed-off-by:Ming Lei <tom.leiming@gmail.com>
> Reported-by:Catalin Marinas <catalin.marinas@arm.com>
> Acked-by: David Woodhouse <David.Woodhouse@intel.com>
---
This patch is against Catalin Marinas's patch:
[PATCH] Free struct device in fw_dev_release()
> ---
> drivers/base/firmware_class.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> index fc46653..2643366 100644
> --- a/drivers/base/firmware_class.c
> +++ b/drivers/base/firmware_class.c
> @@ -180,7 +180,6 @@ static ssize_t firmware_loading_store(struct device *dev,
> goto err;
> }
> /* Pages will be freed by vfree() */
> - fw_priv->pages = NULL;
> fw_priv->page_array_size = 0;
> fw_priv->nr_pages = 0;
> complete(&fw_priv->completion);
> --
> 1.6.0.GIT
>
>
--
Lei Ming
next prev parent reply other threads:[~2009-07-09 0:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 0:16 tom.leiming
2009-07-09 0:20 ` Ming Lei [this message]
2009-07-10 17:36 ` Greg KH
2009-07-11 3:11 ` Ming Lei
2009-07-16 13:22 ` Ming Lei
2009-07-16 22:41 ` 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=d82e647a0907081720v438344fcj1b37e0e226818632@mail.gmail.com \
--to=tom.leiming@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=dwmw2@infradead.org \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--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 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®