Author: Julia Lawall <julia@diku.dk> Use local_irq_restore in this error-handling case just like in the one just below. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E1; identifier f; @@ f (…) { } // Signed-off-by: Julia Lawall Signed-off-by: Dominik Brodowski — drivers/pcmcia/db1xxx_ss.c | 4 …
Category: Linux
Mar 29 2010
drivers/net: Add missing unlock
Author: Julia Lawall <julia@diku.dk> Unlock the lock before leaving the function. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E1; identifier f; @@ f (…) { } // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — drivers/net/sgiseeq.c | 4 +++- 1 file changed, 3 …
Mar 29 2010
powerpc/pmac: Add missing unlocks in error path
Author: Julia Lawall <julia@diku.dk> In some error handling cases the lock is not unlocked. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E1; identifier f; @@ f (…) { } // Signed-off-by: Julia Lawall Signed-off-by: Benjamin Herrenschmidt — drivers/macintosh/macio-adb.c | 1 + drivers/macintosh/smu.c | …
Mar 29 2010
powerpc/vio: Add missing unlock in error path
Author: Julia Lawall <julia@diku.dk> Add an unlock before exiting the function. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E1; identifier f; @@ f (…) { } // Signed-off-by: Julia Lawall Acked-by: Stephen Rothwell Signed-off-by: Benjamin Herrenschmidt — arch/powerpc/kernel/vio.c | 4 +++- 1 file …
Mar 29 2010
powerpc/pmac/windfarm: Correct potential double free
Author: Julia Lawall <julia@diku.dk> The conditionals were testing different values, but then all freeing the same one, which could result in a double free. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,e; identifier f; iterator I; statement S; @@ *kfree(x); … when != &x …
Mar 28 2010
arch/sparc/kernel: Use set_cpus_allowed_ptr
Author: Julia Lawall <julia@diku.dk> Use set_cpus_allowed_ptr rather than set_cpus_allowed. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression E1,E2; @@ – set_cpus_allowed(E1, cpumask_of_cpu(E2)) + set_cpus_allowed_ptr(E1, cpumask_of(E2)) @@ expression E; identifier I; @@ – set_cpus_allowed(E, I) + set_cpus_allowed_ptr(E, &I) // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — arch/sparc/kernel/sysfs.c | 4 …
Mar 27 2010
arch/sh/kernel: Use set_cpus_allowed_ptr
Author: Julia Lawall <julia@diku.dk> Use set_cpus_allowed_ptr rather than set_cpus_allowed. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression E1,E2; @@ – set_cpus_allowed(E1, cpumask_of_cpu(E2)) + set_cpus_allowed_ptr(E1, cpumask_of(E2)) @@ expression E; identifier I; @@ – set_cpus_allowed(E, I) + set_cpus_allowed_ptr(E, &I) // Signed-off-by: Julia Lawall Signed-off-by: Paul Mundt — arch/sh/kernel/cpufreq.c | 4 ++– …
Mar 27 2010
MIPS: Use set_cpus_allowed_ptr
Author: Julia Lawall <julia@diku.dk> From: Julia Lawall Use set_cpus_allowed_ptr rather than set_cpus_allowed. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression E1,E2; @@ – set_cpus_allowed(E1, cpumask_of_cpu(E2)) + set_cpus_allowed_ptr(E1, cpumask_of(E2)) @@ expression E; identifier I; @@ – set_cpus_allowed(E, I) + set_cpus_allowed_ptr(E, &I) // Signed-off-by: Julia Lawall To: peterz@infradead.org To: mingo@elte.hu To: …
Mar 26 2010
powerpc: Use set_cpus_allowed_ptr
Author: Julia Lawall <julia@diku.dk> Use set_cpus_allowed_ptr rather than set_cpus_allowed. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression E1,E2; @@ – set_cpus_allowed(E1, cpumask_of_cpu(E2)) + set_cpus_allowed_ptr(E1, cpumask_of(E2)) @@ expression E; identifier I; @@ – set_cpus_allowed(E, I) + set_cpus_allowed_ptr(E, &I) // Signed-off-by: Julia Lawall Signed-off-by: Benjamin Herrenschmidt — arch/powerpc/kernel/smp.c | 4 ++– …
Mar 22 2010
[ARM] pxa: avoid NULL dereferencing in error handling of ssp.c
Author: Julia Lawall <julia@diku.dk> The assignments of res to the results of the two calls to platform_get_resource make it impossible to use res in the error handling code in the arguments to release_mem_region. The semantic match that finds the former problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E, E1; identifier f; statement S1,S3; …