* [PATCH] driver core:firmware_class:fix memory leak of page pointers array
@ 2009-07-09 0:16 tom.leiming
2009-07-09 0:20 ` Ming Lei
0 siblings, 1 reply; 6+ messages in thread
From: tom.leiming @ 2009-07-09 0:16 UTC (permalink / raw)
To: greg; +Cc: linux-kernel, catalin.marinas, dwmw2, kay.sievers, Ming Lei
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] driver core:firmware_class:fix memory leak of page pointers array
2009-07-09 0:16 [PATCH] driver core:firmware_class:fix memory leak of page pointers array tom.leiming
@ 2009-07-09 0:20 ` Ming Lei
2009-07-10 17:36 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Ming Lei @ 2009-07-09 0:20 UTC (permalink / raw)
To: greg; +Cc: linux-kernel, catalin.marinas, dwmw2, kay.sievers, Ming Lei
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] driver core:firmware_class:fix memory leak of page pointers array
2009-07-09 0:20 ` Ming Lei
@ 2009-07-10 17:36 ` Greg KH
2009-07-11 3:11 ` Ming Lei
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2009-07-10 17:36 UTC (permalink / raw)
To: Ming Lei; +Cc: linux-kernel, catalin.marinas, dwmw2, kay.sievers
On Thu, Jul 09, 2009 at 08:20:48AM +0800, Ming Lei wrote:
> 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()
Hm, I never got a final version of that patch, care to send it to me?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] driver core:firmware_class:fix memory leak of page pointers array
2009-07-10 17:36 ` Greg KH
@ 2009-07-11 3:11 ` Ming Lei
2009-07-16 13:22 ` Ming Lei
0 siblings, 1 reply; 6+ messages in thread
From: Ming Lei @ 2009-07-11 3:11 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, catalin.marinas, dwmw2, kay.sievers
于 Fri, 10 Jul 2009 10:36:49 -0700
Greg KH <greg@kroah.com> 写道:
> On Thu, Jul 09, 2009 at 08:20:48AM +0800, Ming Lei wrote:
> > 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()
>
> Hm, I never got a final version of that patch, care to send it to me?
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@gmail.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@gmail.com>
Reported-by:Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] driver core:firmware_class:fix memory leak of page pointers array
2009-07-11 3:11 ` Ming Lei
@ 2009-07-16 13:22 ` Ming Lei
2009-07-16 22:41 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Ming Lei @ 2009-07-16 13:22 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, catalin.marinas, dwmw2, kay.sievers
2009/7/11 Ming Lei <tom.leiming@gmail.com>:
> On Fri, 10 Jul 2009 10:36:49 -0700
> Greg KH <greg@kroah.com> wrote:
>
>> On Thu, Jul 09, 2009 at 08:20:48AM +0800, Ming Lei wrote:
>> > 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()
>>
>> 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@gmail.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@gmail.com>
> Reported-by:Catalin Marinas <catalin.marinas@arm.com>
> Acked-by: David Woodhouse <David.Woodhouse@intel.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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] driver core:firmware_class:fix memory leak of page pointers array
2009-07-16 13:22 ` Ming Lei
@ 2009-07-16 22:41 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2009-07-16 22:41 UTC (permalink / raw)
To: Ming Lei; +Cc: linux-kernel, catalin.marinas, dwmw2, kay.sievers
On Thu, Jul 16, 2009 at 09:22:33PM +0800, Ming Lei wrote:
> 2009/7/11 Ming Lei <tom.leiming@gmail.com>:
> > On Fri, 10 Jul 2009 10:36:49 -0700
> > Greg KH <greg@kroah.com> wrote:
> >
> >> On Thu, Jul 09, 2009 at 08:20:48AM +0800, Ming Lei wrote:
> >> > 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()
> >>
> >> 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?
Now queued up.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-07-16 22:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-09 0:16 [PATCH] driver core:firmware_class:fix memory leak of page pointers array tom.leiming
2009-07-09 0:20 ` Ming Lei
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.