Catégorie : 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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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

Lire la suite

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

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.