[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d82e647a0907160622y2ec1798eue1310b7feaf79114@mail.gmail.com>
Date: Thu, 16 Jul 2009 21:22:33 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Greg KH <greg@...ah.com>
Cc: linux-kernel@...r.kernel.org, catalin.marinas@....com,
dwmw2@...radead.org, kay.sievers@...y.org
Subject: Re: [PATCH] driver core:firmware_class:fix memory leak of page
pointers array
2009/7/11 Ming Lei <tom.leiming@...il.com>:
> On Fri, 10 Jul 2009 10:36:49 -0700
> Greg KH <greg@...ah.com> wrote:
>
>> On Thu, Jul 09, 2009 at 08:20:48AM +0800, Ming Lei wrote:
>> > 2009/7/9 <tom.leiming@...il.com>:
>> > > From: Ming Lei <tom.leiming@...il.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@...il.com>
>> > > Reported-by:Catalin Marinas <catalin.marinas@....com>
>> > > Acked-by: David Woodhouse <David.Woodhouse@...el.com>
>> >
>> > ---
>> > This patch is against Catalin Marinas's patch:
>> > [PATCH] Free struct device in fw_dev_release()
>>
>> Hm, I never got a final version of that patch, care to send it to me?
Hi,Greg
Care to queue the patch into your driver-core tree and send it to -rc4?
Thanks.
>
> It is the latest version and now is against linus mainline.
> Thanks.
>
> From 50603673f5c68eb843584e65cc9930919910f98a Mon Sep 17 00:00:00 2001
> From: Ming Lei <tom.leiming@...il.com>
> Date: Thu, 9 Jul 2009 07:56:52 +0800
> Subject: [PATCH] driver core:firmware_class:fix memory leak of page pointers array
>
> 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@...il.com>
> Reported-by:Catalin Marinas <catalin.marinas@....com>
> Acked-by: David Woodhouse <David.Woodhouse@...el.com>
> ---
> 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
>
--
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists