Author: Julia Lawall <julia@diku.dk> The tty value that should be put is the one that was just gotten by tty_port_tty_get, not the one that is the argument to the enclosing function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ local idexpression struct tty_struct *x; expression ra,rr; statement S1,S2; @@ x …
Catégorie : Linux
Apr 23 2011
drivers/video/s3c2410fb.c: Convert release_resource to release_mem_region
Author: Julia Lawall <julia@diku.dk> Request_mem_region should be used with release_mem_region, not release_resource. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ expression e1,e2,e3,e4,e; @@ *e4 = request_mem_region(e1,e2,e3) … when != e4 = e *release_resource(e4); // Signed-off-by: Julia Lawall Signed-off-by: Paul Mundt — drivers/video/s3c2410fb.c | 8 +++—– 1 file changed, 3 …
Apr 23 2011
drivers/video/sm501fb.c: Convert release_resource to release_mem_region
Author: Julia Lawall <julia@diku.dk> Request_mem_region should be used with release_mem_region, not release_resource. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ expression e1,e2,e3,e4,e; @@ *e4 = request_mem_region(e1,e2,e3) … when != e4 = e *release_resource(e4); // Signed-off-by: Julia Lawall Signed-off-by: Paul Mundt — drivers/video/sm501fb.c | 24 ++++++++++++———— 1 file changed, 12 …
Apr 23 2011
drivers/video: Convert release_resource to release_mem_region
Author: Julia Lawall <julia@diku.dk> Request_mem_region should be used with release_mem_region, not release_resource. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ expression e1,e2,e3,e4,e; @@ *e4 = request_mem_region(e1,e2,e3) … when != e4 = e *release_resource(e4); // Signed-off-by: Julia Lawall Signed-off-by: Paul Mundt — drivers/video/s3c-fb.c | 6 ++—- drivers/video/sh7760fb.c | 6 ++—- …
Apr 19 2011
btrfs: unify checking of IS_ERR and null
Author: David Sterba <dsterba@suse.cz> use IS_ERR_OR_NULL when possible, done by this coccinelle script: @ match @ identifier id; @@ ( – BUG_ON(IS_ERR(id) || !id); + BUG_ON(IS_ERR_OR_NULL(id)); | – IS_ERR(id) || !id + IS_ERR_OR_NULL(id) | – !id || IS_ERR(id) + IS_ERR_OR_NULL(id) ) Signed-off-by: David Sterba — fs/btrfs/acl.c | 2 +- fs/btrfs/extent_io.c | 12 ++++++—— fs/btrfs/file.c | …
Apr 08 2011
crypto: caam – 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 …
Apr 01 2011
drivers/video/bfin-lq035q1-fb.c: 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 …
Apr 01 2011
[SCSI] bnx2fc: 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 …
Apr 01 2011
drivers/staging/intel_sst/intel_sst_app_interface.c: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Stream_bufs is initialized at the beginning of the function, and then the #ifdef code declares a new variable with the same name and initializes that. If the if in the ifdef is taken, the then branch returns, implying that the first stream_bufs is never used and is leaked. The first initialization …
Apr 01 2011
drivers/staging/cx25821/cx25821-video.c: 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 …