diff mbox

Fix for fsl_upm

Message ID 4EA9683D.8030100@dev.rtsoft.ru (mailing list archive)
State Accepted, archived
Commit 7145cf12095265b8a292835d0f6da87f89fac1d1
Delegated to: Kumar Gala
Headers show

Commit Message

Rusev Oct. 27, 2011, 2:18 p.m. UTC
patch is vs. 2.6.39, yet it applied to 3.1

Comments

Kumar Gala Oct. 27, 2011, 6:28 p.m. UTC | #1
On Oct 27, 2011, at 9:18 AM, Rusev wrote:

> patch is vs. 2.6.39, yet it applied to 3.1
> 
> 
> 
> Fix of UPM driver for Freescale PowerPC processors
> 
> If Freescale LBC driver fails to initialise itself from device tree,
> then internal structure is freed only but not NULL-fied.
> As result functions fsl_lbc_find() after checking the structure is not NULL are
> trying to access device registers.
> 
> Signed-off-by: Alexandre Rusev <arusev@dev.rtsoft.ru> 
> --- linux-2.6.39.old/arch/powerpc/sysdev/fsl_lbc.c	2011-10-27 03:17:28.000000000 +0400
> +++ linux-2.6.39/arch/powerpc/sysdev/fsl_lbc.c	2011-10-27 05:06:44.000000000 +0400
> @@ -322,6 +322,7 @@ static int __devinit fsl_lbc_ctrl_probe(
> err:
> 	iounmap(fsl_lbc_ctrl_dev->regs);
> 	kfree(fsl_lbc_ctrl_dev);
> +	fsl_lbc_ctrl_dev = NULL;
> 	return ret;
> }
> 

Can you send this as a proper patch.

- k
Kumar Gala Nov. 24, 2011, 7:46 a.m. UTC | #2
On Oct 27, 2011, at 9:18 AM, Rusev wrote:

> patch is vs. 2.6.39, yet it applied to 3.1
> 
> 
> 
> Fix of UPM driver for Freescale PowerPC processors
> 
> If Freescale LBC driver fails to initialise itself from device tree,
> then internal structure is freed only but not NULL-fied.
> As result functions fsl_lbc_find() after checking the structure is not NULL are
> trying to access device registers.
> 
> Signed-off-by: Alexandre Rusev <arusev@dev.rtsoft.ru> 

applied to next

- k
diff mbox

Patch

Fix of UPM driver for Freescale PowerPC processors

If Freescale LBC driver fails to initialise itself from device tree,
then internal structure is freed only but not NULL-fied.
As result functions fsl_lbc_find() after checking the structure is not NULL are
trying to access device registers.

Signed-off-by: Alexandre Rusev <arusev@dev.rtsoft.ru> 
--- linux-2.6.39.old/arch/powerpc/sysdev/fsl_lbc.c	2011-10-27 03:17:28.000000000 +0400
+++ linux-2.6.39/arch/powerpc/sysdev/fsl_lbc.c	2011-10-27 05:06:44.000000000 +0400
@@ -322,6 +322,7 @@  static int __devinit fsl_lbc_ctrl_probe(
 err:
 	iounmap(fsl_lbc_ctrl_dev->regs);
 	kfree(fsl_lbc_ctrl_dev);
+	fsl_lbc_ctrl_dev = NULL;
 	return ret;
 }