public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] CLK: TI: APLL: not allocating enough data
@ 2014-06-16  9:32 Dan Carpenter
  2014-06-19 11:25 ` Tero Kristo
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-06-16  9:32 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Tero Kristo, Tony Lindgren, J Keerthy, linux-kernel,
	kernel-janitors

There is a cut and paste bug here which will lead to memory corruption
because we don't allocate enough data.

Fixes: 4d008589e271 ('CLK: TI: APLL: add support for omap2 aplls')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
index 5428c9c..18dbaf12 100644
--- a/drivers/clk/ti/apll.c
+++ b/drivers/clk/ti/apll.c
@@ -338,7 +338,7 @@ static void __init of_omap2_apll_setup(struct device_node *node)
 	const char *parent_name;
 	u32 val;
 
-	ad = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
+	ad = kzalloc(sizeof(*ad), GFP_KERNEL);
 	clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
 	init = kzalloc(sizeof(*init), GFP_KERNEL);
 

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

* Re: [patch] CLK: TI: APLL: not allocating enough data
  2014-06-16  9:32 [patch] CLK: TI: APLL: not allocating enough data Dan Carpenter
@ 2014-06-19 11:25 ` Tero Kristo
  0 siblings, 0 replies; 2+ messages in thread
From: Tero Kristo @ 2014-06-19 11:25 UTC (permalink / raw)
  To: Dan Carpenter, Mike Turquette
  Cc: Tony Lindgren, J Keerthy, linux-kernel, kernel-janitors

On 06/16/2014 12:32 PM, Dan Carpenter wrote:
> There is a cut and paste bug here which will lead to memory corruption
> because we don't allocate enough data.
>
> Fixes: 4d008589e271 ('CLK: TI: APLL: add support for omap2 aplls')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks, queued for 3.16-rc fixes.

-Tero

>
> diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
> index 5428c9c..18dbaf12 100644
> --- a/drivers/clk/ti/apll.c
> +++ b/drivers/clk/ti/apll.c
> @@ -338,7 +338,7 @@ static void __init of_omap2_apll_setup(struct device_node *node)
>   	const char *parent_name;
>   	u32 val;
>
> -	ad = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
> +	ad = kzalloc(sizeof(*ad), GFP_KERNEL);
>   	clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
>   	init = kzalloc(sizeof(*init), GFP_KERNEL);
>
>


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

end of thread, other threads:[~2014-06-19 11:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16  9:32 [patch] CLK: TI: APLL: not allocating enough data Dan Carpenter
2014-06-19 11:25 ` Tero Kristo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox