Quentin LAMBERT

Author's posts

V4L/DVB (13414): ttusb-dec: do not overwrite the first part of phys string

Author: Márton Németh <nm127@freemail.hu> Use strlcat() to append a string to the previously created first part. The semantic match that finds this kind of problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression dev; expression phys; expression str; expression size; @@ usb_make_path(dev, phys, size); – strlcpy(phys, str, size); + strlcat(phys, str, size); // Signed-off-by: Márton Németh …

Continue reading

fs/ceph: Move a dereference below a NULL test

Author: Julia Lawall <julia@diku.dk> If the NULL test is necessary, then the dereference should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/). // @@ type T; expression E; identifier i,fld; statement S; @@ – T i = E->fld; + T i; … when != E when …

Continue reading

fs/ceph: 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 this 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

USB: ehci-omap.c: introduce missing kfree

Author: Julia Lawall <julia@diku.dk> Error handling code following a kzalloc should free the allocated data. The semantic match that finds this 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

USB: xhci-mem.c: introduce missing kfree

Author: Julia Lawall <julia@diku.dk> Error handling code following a kzalloc should free the allocated data. The semantic match that finds this 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/pcmcia: remove unnecessary kzalloc

Author: Julia Lawall <julia@diku.dk> The result of calling kzalloc is never used or freed. The semantic match that finds this 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

V4L/DVB (13413): introduce missing kfree

Author: Julia Lawall <julia@diku.dk> Error handling code following a kzalloc should free the allocated data. Similarly for usb-alloc urb. The semantic match that finds the first 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 …

Continue reading

drivers/net/atl1c: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

drivers/net/wireless/rtl818x: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

drivers/net/wireless/p54: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading