Articles de cet auteur
Sep 13 2009
MIPS: TXx9: Fix error handling.
Author: Julia Lawall <julia@diku.dk> Error handling code following a kzalloc should free the allocated data. Error handling code following an ioremap should iounmap the allocated data. The semantic match that finds the first problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != …
Sep 12 2009
x86: apic: Convert BUG() to BUG_ON()
Author: Daniel Walker <dwalker@fifo99.com> This was done using Coccinelle’s BUG_ON semantic patch. Signed-off-by: Daniel Walker Cc: Julia Lawall LKML-Reference: Signed-off-by: Ingo Molnar — arch/x86/kernel/apic/apic.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 159740d..79e5b92 100644 — a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -1196,8 +1196,7 @@ void __cpuinit setup_local_APIC(void) * Double-check …
Sep 12 2009
ASoC: Clean up error handling in MPC5200 DMA setup
Author: Julia Lawall <julia@diku.dk> Error handling code following a kzalloc should free the allocated data. Error handling code following an ioremap should iounmap the allocated data. The semantic match that finds the first problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != …
Sep 11 2009
Staging: iio: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Error handling code following a kmalloc or kzalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(…); … if (x == NULL) …
Sep 11 2009
Staging: dream: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Error handling code following a kmalloc or kzalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(…); … if (x == NULL) …
Sep 11 2009
drivers/net/phy: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Error handling code following a kzalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(…); … if (x == NULL) S f1 …
Sep 11 2009
drivers/net/wan: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(…); … if (x == NULL) S f1 …
Aug 31 2009
Staging: rtl8192e: Drop unnecessary NULL test
Author: Julia Lawall <julia@diku.dk> The result of container_of should not be NULL. In particular, in this case the argument to the enclosing function has passed though INIT_WORK, which dereferences it, implying that its container cannot be NULL. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ identifier …
Aug 23 2009
[S390] drivers/s390: put NULL test before dereference
Author: Julia Lawall <julia@diku.dk> If the NULL test on block is needed, it should be before the dereference of the base field. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ expression E1,E2; identifier fld; statement S1,S2; @@ E1 = E2->fld; ( if (E1 == NULL) S1 else S2 | *if …
Aug 15 2009
staging: Make some structures static
Author: Julia Lawall <julia@diku.dk> This was done using a semantic patch (http://coccinelle.lip6.fr/) that checks that the declaration is not inside a function definition, that the defined variable is not exported using EXPORTED_SYMBOL, etc, and that the defined variable does not occur in any other file. If these conditions hold, static is added before the declaration. …