linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: dma.c: fix memory leakage
@ 2013-01-19 13:06 Cong Ding
  2013-01-20 22:24 ` Rob Herring
  0 siblings, 1 reply; 8+ messages in thread
From: Cong Ding @ 2013-01-19 13:06 UTC (permalink / raw)
  To: Grant Likely, Rob Herring, devicetree-discuss, linux-kernel; +Cc: Cong Ding

The memory allocated to ofdma might be a leakage when error occurs.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 drivers/of/dma.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/dma.c b/drivers/of/dma.c
index 59631b2..583e50e3 100644
--- a/drivers/of/dma.c
+++ b/drivers/of/dma.c
@@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np,
 	if (!nbcells) {
 		pr_err("%s: #dma-cells property is missing or invalid\n",
 		       __func__);
+		kfree(ofdma);
 		return -EINVAL;
 	}
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] of: dma.c: fix memory leakage
  2013-01-19 13:06 [PATCH] of: dma.c: fix memory leakage Cong Ding
@ 2013-01-20 22:24 ` Rob Herring
  2013-01-22 10:10   ` Cong Ding
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2013-01-20 22:24 UTC (permalink / raw)
  To: Cong Ding; +Cc: Grant Likely, devicetree-discuss, linux-kernel

On 01/19/2013 07:06 AM, Cong Ding wrote:
> The memory allocated to ofdma might be a leakage when error occurs.
> 
> Signed-off-by: Cong Ding <dinggnu@gmail.com>

You need to send this to whomever is working on DMA bindings.

Rob

> ---
>  drivers/of/dma.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/of/dma.c b/drivers/of/dma.c
> index 59631b2..583e50e3 100644
> --- a/drivers/of/dma.c
> +++ b/drivers/of/dma.c
> @@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np,
>  	if (!nbcells) {
>  		pr_err("%s: #dma-cells property is missing or invalid\n",
>  		       __func__);
> +		kfree(ofdma);
>  		return -EINVAL;
>  	}
>  
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] of: dma.c: fix memory leakage
  2013-01-20 22:24 ` Rob Herring
@ 2013-01-22 10:10   ` Cong Ding
  2013-02-12 17:40     ` Vinod Koul
  0 siblings, 1 reply; 8+ messages in thread
From: Cong Ding @ 2013-01-22 10:10 UTC (permalink / raw)
  To: Rob Herring, Vinod Koul; +Cc: Grant Likely, devicetree-discuss, linux-kernel

On Sun, Jan 20, 2013 at 04:24:49PM -0600, Rob Herring wrote:
> On 01/19/2013 07:06 AM, Cong Ding wrote:
> > The memory allocated to ofdma might be a leakage when error occurs.
> > 
> > Signed-off-by: Cong Ding <dinggnu@gmail.com>
> 
> You need to send this to whomever is working on DMA bindings.
Thank you bob, I added Vinod the the receiver list.

- cong

> 
> > ---
> >  drivers/of/dma.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/of/dma.c b/drivers/of/dma.c
> > index 59631b2..583e50e3 100644
> > --- a/drivers/of/dma.c
> > +++ b/drivers/of/dma.c
> > @@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np,
> >  	if (!nbcells) {
> >  		pr_err("%s: #dma-cells property is missing or invalid\n",
> >  		       __func__);
> > +		kfree(ofdma);
> >  		return -EINVAL;
> >  	}
> >  
> > 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] of: dma.c: fix memory leakage
  2013-01-22 10:10   ` Cong Ding
@ 2013-02-12 17:40     ` Vinod Koul
  2013-02-13 11:26       ` Cong Ding
  2013-02-14 10:16       ` [PATCH v2] dma: of-dma.c: " Cong Ding
  0 siblings, 2 replies; 8+ messages in thread
From: Vinod Koul @ 2013-02-12 17:40 UTC (permalink / raw)
  To: Cong Ding; +Cc: Rob Herring, Grant Likely, devicetree-discuss, linux-kernel

On Tue, Jan 22, 2013 at 10:10:53AM +0000, Cong Ding wrote:
> On Sun, Jan 20, 2013 at 04:24:49PM -0600, Rob Herring wrote:
> > On 01/19/2013 07:06 AM, Cong Ding wrote:
> > > The memory allocated to ofdma might be a leakage when error occurs.
> > > 
> > > Signed-off-by: Cong Ding <dinggnu@gmail.com>
> > 
> > You need to send this to whomever is working on DMA bindings.
> Thank you bob, I added Vinod the the receiver list.
I have moved the of/dma.c to dma/of-dma.c, can you regenerate this patch and
resend to me

--
~Vinod

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] of: dma.c: fix memory leakage
  2013-02-12 17:40     ` Vinod Koul
@ 2013-02-13 11:26       ` Cong Ding
  2013-02-14  4:42         ` Vinod Koul
  2013-02-14 10:16       ` [PATCH v2] dma: of-dma.c: " Cong Ding
  1 sibling, 1 reply; 8+ messages in thread
From: Cong Ding @ 2013-02-13 11:26 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Rob Herring, Grant Likely, devicetree-discuss, linux-kernel

On Tue, Feb 12, 2013 at 09:40:25AM -0800, Vinod Koul wrote:
> On Tue, Jan 22, 2013 at 10:10:53AM +0000, Cong Ding wrote:
> > On Sun, Jan 20, 2013 at 04:24:49PM -0600, Rob Herring wrote:
> > > On 01/19/2013 07:06 AM, Cong Ding wrote:
> > > > The memory allocated to ofdma might be a leakage when error occurs.
> > > > 
> > > > Signed-off-by: Cong Ding <dinggnu@gmail.com>
> > > 
> > > You need to send this to whomever is working on DMA bindings.
> > Thank you bob, I added Vinod the the receiver list.
> I have moved the of/dma.c to dma/of-dma.c, can you regenerate this patch and
> resend to me
Sorry Vinod, I didn't manage to get this commit from either linux-next tree or
slave-dma tree, and the last commit by you for of/dma.c file is on Jan 7. Did
you have any hints for me to get the latest version dma/of-dma.c?
 - cong


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] of: dma.c: fix memory leakage
  2013-02-13 11:26       ` Cong Ding
@ 2013-02-14  4:42         ` Vinod Koul
  0 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2013-02-14  4:42 UTC (permalink / raw)
  To: Cong Ding; +Cc: Rob Herring, Grant Likely, devicetree-discuss, linux-kernel

On Wed, Feb 13, 2013 at 12:26:23PM +0100, Cong Ding wrote:
> > > > You need to send this to whomever is working on DMA bindings.
> > > Thank you bob, I added Vinod the the receiver list.
> > I have moved the of/dma.c to dma/of-dma.c, can you regenerate this patch and
> > resend to me
> Sorry Vinod, I didn't manage to get this commit from either linux-next tree or
> slave-dma tree, and the last commit by you for of/dma.c file is on Jan 7. Did
> you have any hints for me to get the latest version dma/of-dma.c?
AH my bad, seems i have not pushed it out :(

Pushed now...


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] dma: of-dma.c: fix memory leakage
  2013-02-12 17:40     ` Vinod Koul
  2013-02-13 11:26       ` Cong Ding
@ 2013-02-14 10:16       ` Cong Ding
  2013-02-14 13:42         ` Vinod Koul
  1 sibling, 1 reply; 8+ messages in thread
From: Cong Ding @ 2013-02-14 10:16 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Rob Herring, Grant Likely, devicetree-discuss, linux-kernel

The memory allocated to ofdma might be a leakage when error occurs.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 drivers/dma/of-dma.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
index 59631b2..583e50e3 100644
--- a/drivers/dma/of-dma.c
+++ b/drivers/dma/of-dma.c
@@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np,
 	if (!nbcells) {
 		pr_err("%s: #dma-cells property is missing or invalid\n",
 		       __func__);
+		kfree(ofdma);
 		return -EINVAL;
 	}
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] dma: of-dma.c: fix memory leakage
  2013-02-14 10:16       ` [PATCH v2] dma: of-dma.c: " Cong Ding
@ 2013-02-14 13:42         ` Vinod Koul
  0 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2013-02-14 13:42 UTC (permalink / raw)
  To: Cong Ding; +Cc: Rob Herring, Grant Likely, devicetree-discuss, linux-kernel

On Thu, Feb 14, 2013 at 11:16:10AM +0100, Cong Ding wrote:
> The memory allocated to ofdma might be a leakage when error occurs.
> 
> Signed-off-by: Cong Ding <dinggnu@gmail.com>
Applied, thanks

--
~Vinod
> ---
>  drivers/dma/of-dma.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
> index 59631b2..583e50e3 100644
> --- a/drivers/dma/of-dma.c
> +++ b/drivers/dma/of-dma.c
> @@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np,
>  	if (!nbcells) {
>  		pr_err("%s: #dma-cells property is missing or invalid\n",
>  		       __func__);
> +		kfree(ofdma);
>  		return -EINVAL;
>  	}
>  
> -- 
> 1.7.9.5
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-14 13:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-19 13:06 [PATCH] of: dma.c: fix memory leakage Cong Ding
2013-01-20 22:24 ` Rob Herring
2013-01-22 10:10   ` Cong Ding
2013-02-12 17:40     ` Vinod Koul
2013-02-13 11:26       ` Cong Ding
2013-02-14  4:42         ` Vinod Koul
2013-02-14 10:16       ` [PATCH v2] dma: of-dma.c: " Cong Ding
2013-02-14 13:42         ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).