linux-stable/arch/powerpc
Julia Lawall 7a19081fc2 pseries/iommu: Add missing kfree
At this point, window has not been stored anywhere, so it has to be freed
before leaving the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@exists@
local idexpression x;
statement S,S1;
expression E;
identifier fl;
expression *ptr != NULL;
@@

x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...kfree(x)...+> }
     when any
     when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
               when forall
(
 return \(0\|<+...x...+>\|ptr\);
|
* return ...;
)
}
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-09-20 09:19:49 +10:00
..
boot powerpc: Fix build dependencies for epapr.c which needs libfdt.h 2011-09-20 09:19:44 +10:00
configs powerpc/40x: Remove obsolete HCU4 board 2011-08-11 13:56:43 -04:00
include/asm powerpc/nvram: Add compression to fit more oops output into NVRAM 2011-09-20 09:19:46 +10:00
kernel powerpc/32: Pass device tree address as u64 to machine_init 2011-09-20 09:19:47 +10:00
kvm powerpc/kvm: Fix build errors with older toolchains 2011-08-05 14:47:56 +10:00
lib Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-05-20 13:28:01 -07:00
math-emu powerpc/85xx: Fix SPE float to integer conversion failure 2011-03-15 13:48:15 -05:00
mm powerpc: Hugetlb for BookE 2011-09-20 09:19:40 +10:00
net net: filter: BPF 'JIT' compiler for PPC64 2011-07-21 12:38:32 -07:00
oprofile powerpc/oprofile: Handle events that raise an exception without overflowing 2011-05-26 13:38:57 +10:00
platforms pseries/iommu: Add missing kfree 2011-09-20 09:19:49 +10:00
sysdev powerpc/mpic: Add support for discontiguous cores 2011-09-20 09:19:42 +10:00
xmon powerpc: Remove call sites of MSG_ALL_BUT_SELF 2011-05-19 14:30:46 +10:00
Kconfig powerpc: Hugetlb for BookE 2011-09-20 09:19:40 +10:00
Kconfig.debug powerpc/pseries: Re-implement HVSI as part of hvc_vio 2011-06-29 17:48:35 +10:00
Makefile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-07-25 22:59:39 -07:00
relocs_check.pl powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00