linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Fix for fsl_upm
@ 2011-10-27 14:18 Rusev
  2011-10-27 18:28 ` Kumar Gala
  2011-11-24  7:46 ` Kumar Gala
  0 siblings, 2 replies; 3+ messages in thread
From: Rusev @ 2011-10-27 14:18 UTC (permalink / raw)
  To: benh, paulus, galak, Shengzhou.Liu, Shaohui.Xie, linuxppc-dev,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 46 bytes --]

patch is vs. 2.6.39, yet it applied to 3.1




[-- Attachment #2: fsl_lbc.c.patch --]
[-- Type: text/x-patch, Size: 694 bytes --]

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;
 }
 

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

* Re: Fix for fsl_upm
  2011-10-27 14:18 Fix for fsl_upm Rusev
@ 2011-10-27 18:28 ` Kumar Gala
  2011-11-24  7:46 ` Kumar Gala
  1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2011-10-27 18:28 UTC (permalink / raw)
  To: Rusev; +Cc: Shaohui.Xie, linux-kernel, Shengzhou.Liu, paulus, linuxppc-dev


On Oct 27, 2011, at 9:18 AM, Rusev wrote:

> patch is vs. 2.6.39, yet it applied to 3.1
>=20
>=20
>=20
> Fix of UPM driver for Freescale PowerPC processors
>=20
> 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.
>=20
> Signed-off-by: Alexandre Rusev <arusev@dev.rtsoft.ru>=20
> --- 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 =3D NULL;
> 	return ret;
> }
>=20

Can you send this as a proper patch.

- k

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

* Re: Fix for fsl_upm
  2011-10-27 14:18 Fix for fsl_upm Rusev
  2011-10-27 18:28 ` Kumar Gala
@ 2011-11-24  7:46 ` Kumar Gala
  1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2011-11-24  7:46 UTC (permalink / raw)
  To: Rusev; +Cc: Shaohui.Xie, linux-kernel, Shengzhou.Liu, paulus, linuxppc-dev


On Oct 27, 2011, at 9:18 AM, Rusev wrote:

> patch is vs. 2.6.39, yet it applied to 3.1
>=20
>=20
>=20
> Fix of UPM driver for Freescale PowerPC processors
>=20
> 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.
>=20
> Signed-off-by: Alexandre Rusev <arusev@dev.rtsoft.ru>=20

applied to next

- k=

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

end of thread, other threads:[~2011-11-24  7:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-27 14:18 Fix for fsl_upm Rusev
2011-10-27 18:28 ` Kumar Gala
2011-11-24  7:46 ` Kumar Gala

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).