linux/arch
Liu Gang e80dd9a7bc arch/powerpc/sysdev/fsl_rio.c: release rapidio port I/O region resource if port failed to initialize
The "struct rio_mport" contains a member of master port I/O memory
resource structure "struct resource iores".  This resource will be read
from device tree and be used for rapidio R/W transaction memory space.
Rapidio requests the port I/O memory resource under the root resource
"iomem_resource".

			struct rio_mport *port;
			port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL);

			request_resource(&iomem_resource, &port->iores);

When port failed to initialize, allocated "rio_mport" structure memory
will be freed, and the port I/O memory resource structure pointer
"&port->iores" will be invalid.  If other requests resource under
"iomem_resource", "&port->iores" node may be operated in the child
resources list and this will cause the system to crash.

So the requested port I/O memory resource should be released before
freeing allocated "rio_mport" structure.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-02 16:07:01 -07:00
..
alpha alpha: wire up sendmmsg syscall 2011-10-31 17:30:51 -07:00
arm Merge branch 'next/soc' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 21:08:03 -07:00
avr32
blackfin Blackfin: irq: remove IRQF_DISABLED 2011-10-26 04:22:26 -04:00
cris kgdb: follow rename pack_hex_byte() to hex_byte_pack() 2011-10-31 17:30:56 -07:00
frv kgdb: follow rename pack_hex_byte() to hex_byte_pack() 2011-10-31 17:30:56 -07:00
h8300 Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6 2011-10-29 07:27:45 -07:00
hexagon Hexagon: Add basic stacktrace functionality for Hexagon architecture. 2011-11-01 07:34:21 -07:00
ia64 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu 2011-10-30 15:46:19 -07:00
m32r m32r: Allow use of atomic64 2011-10-17 23:29:43 -04:00
m68k Merge branch 'for-linus' of git://github.com/gregungerer/m68knommu 2011-10-25 16:25:48 +02:00
microblaze Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2011-10-31 16:13:44 -07:00
mips Merge branch 'for-linus/i2c-3.2' of git://git.fluff.org/bjdooks/linux 2011-11-01 15:07:19 -07:00
mn10300 kgdb: follow rename pack_hex_byte() to hex_byte_pack() 2011-10-31 17:30:56 -07:00
openrisc doc: fix broken references 2011-09-27 18:08:04 +02:00
parisc Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue 2011-10-28 10:49:34 -07:00
powerpc arch/powerpc/sysdev/fsl_rio.c: release rapidio port I/O region resource if port failed to initialize 2011-11-02 16:07:01 -07:00
s390 thp: share get_huge_page_tail() 2011-11-02 16:06:58 -07:00
score
sh net: sh_eth: move the asm/sh_eth.h to include/linux/ 2011-09-28 13:41:51 -04:00
sparc thp: share get_huge_page_tail() 2011-11-02 16:06:58 -07:00
tile Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-26 17:15:03 +02:00
um Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-26 17:15:03 +02:00
unicore32 doc: fix broken references 2011-09-27 18:08:04 +02:00
x86 thp: share get_huge_page_tail() 2011-11-02 16:06:58 -07:00
xtensa Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-26 17:15:03 +02:00
.gitignore
Kconfig