Category: Linux

drivers/tty/moxa.c: Put correct tty value

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 ++—- …

Continue reading

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 | …

Continue reading

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 …

Continue reading

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 …

Continue reading

[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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.