Author: Peter Senna Tschudin <peter.senna@gmail.com> Based on commit: e66131cee501ee720b7b58a4b87073b8fbaaaba6 Not testing videobuf_dvb_get_frontend output may cause OOPS if it return NULL. This patch fixes this issue. The semantic patch that found this issue is(http://coccinelle.lip6.fr/): // @@ identifier i,a,b; statement S, S2; @@ i = videobuf_dvb_get_frontend(…); … when != if (!i) S * if (i->a.b) S2 // …
Catégorie : Linux
Oct 29 2012
staging: dgrp: fix potential NULL defereference issue
Author: Yuanhan Liu <yuanhan.liu@linux.intel.com> Fix a coccinelle warning catched by Fengguang’s 0-DAY system: + drivers/staging/dgrp/dgrp_net_ops.c:1061:11-27: ERROR: nd is NULL but dereferenced. Put the « done: » label a bit down would solve this issue. Cc: Fengguang Wu Cc: Julia Lawall Cc: Greg Kroah-Hartman Signed-off-by: Yuanhan Liu Signed-off-by: Greg Kroah-Hartman — drivers/staging/dgrp/dgrp_net_ops.c | 2 +- 1 file changed, …
Oct 28 2012
netfilter: nf_nat: use PTR_RET
Author: Wu Fengguang <fengguang.wu@intel.com> Use PTR_RET rather than if(IS_ERR(…)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci Reported-by: Fengguang Wu Signed-off-by: Fengguang Wu Signed-off-by: Pablo Neira Ayuso — net/ipv4/netfilter/iptable_nat.c | 4 +— net/ipv6/netfilter/ip6table_nat.c | 4 +— 2 files changed, 2 insertions(+), 6 deletions(-) diff –git a/net/ipv4/netfilter/iptable_nat.c b/net/ipv4/netfilter/iptable_nat.c index 9e0ffaf..8d65b74 100644 — a/net/ipv4/netfilter/iptable_nat.c +++ b/net/ipv4/netfilter/iptable_nat.c @@ -274,9 +274,7 …
Oct 28 2012
drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free
Author: Peter Senna Tschudin <peter.senna@gmail.com> Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0 Calling mdiobus_free without calling mdiobus_unregister causes BUG_ON(). This patch fixes the issue. The semantic patch that found this issue(http://coccinelle.lip6.fr/): // @@ expression E; @@ … when != mdiobus_unregister(E); + mdiobus_unregister(E); mdiobus_free(E); // Signed-off-by: Peter Senna Tschudin Signed-off-by: David S. Miller — drivers/net/phy/mdio-bitbang.c | 1 + 1 …
Oct 28 2012
drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister before mdiobus_free
Author: Peter Senna Tschudin <peter.senna@gmail.com> Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0 Calling mdiobus_free without calling mdiobus_unregister causes BUG_ON(). This patch fixes the issue. The semantic patch that found this issue(http://coccinelle.lip6.fr/): // @@ expression E; @@ … when != mdiobus_unregister(E); + mdiobus_unregister(E); mdiobus_free(E); // Signed-off-by: Peter Senna Tschudin Tested-by: Roland Stigge Tested-by: Alexandre Pereira da Silva Signed-off-by: David …
Oct 27 2012
staging: ced1401: remove useless value cast on kmalloc()
Author: Fengguang Wu <fengguang.wu@intel.com> Casting value returned by k[cmz]alloc to (struct page * *) is useless. Generated by: scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci Reported-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman — drivers/staging/ced1401/ced_ioc.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c index 0adba75..efe6aec 100644 — a/drivers/staging/ced1401/ced_ioc.c +++ b/drivers/staging/ced1401/ced_ioc.c @@ -697,8 +697,7 @@ static int …
Oct 24 2012
drivers/gpu/drm/radeon/evergreen_cs.c: Remove unnecessary semicolon
Author: Peter Senna Tschudin <peter.senna@gmail.com> A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p
Oct 23 2012
[media] wl128x: Replace memcpy with struct assignment
Author: Ezequiel Garcia <elezegarcia@gmail.com> This kind of memcpy() is error-prone. Its replacement with a struct assignment is prefered because it’s type-safe and much easier to read. Found by coccinelle. Hand patched and reviewed. Tested by compilation only. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier …
Oct 23 2012
[media] radio-wl1273: Replace memcpy with struct assignment
Author: Ezequiel Garcia <elezegarcia@gmail.com> This kind of memcpy() is error-prone. Its replacement with a struct assignment is prefered because it’s type-safe and much easier to read. Found by coccinelle. Hand patched and reviewed. Tested by compilation only. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier …
Oct 23 2012
[media] dvb-frontends: Replace memcpy with struct assignment
Author: Ezequiel Garcia <elezegarcia@gmail.com> This kind of memcpy() is error-prone. Its replacement with a struct assignment is prefered because it’s type-safe and much easier to read. Found by coccinelle. Hand patched and reviewed. Tested by compilation only. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier …