Quentin LAMBERT

Author's posts

USB: isp1362: Correct use of ! and &

Author: Julia Lawall <julia@diku.dk> Correct priority problem in the use of ! and &. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression E; constant C; @@ – !E & C + !(E & C) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/usb/host/isp1362-hcd.c | 12 ++++++++—- 1 file changed, …

Continue reading

VIDEO: Correct use of request_region/request_mem_region

Author: Julia Lawall <julia@diku.dk> request_region should be used with release_region, not request_mem_region. Geert Uytterhoeven pointed out that in the case of drivers/video/gbefb.c, the problem is actually the other way around; request_mem_region should be used instead of request_region. The semantic patch that finds/fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r1@ expression start; @@ request_region(start,…) @b1@ …

Continue reading

VIDEO: Correct use of request_region/request_mem_region

Author: Julia Lawall <julia@diku.dk> request_region should be used with release_region, not request_mem_region. Geert Uytterhoeven pointed out that in the case of drivers/video/gbefb.c, the problem is actually the other way around; request_mem_region should be used instead of request_region. The semantic patch that finds/fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r1@ expression start; @@ request_region(start,…) @b1@ …

Continue reading

drivers/net: Correct use of request_region/request_mem_region

Author: Julia Lawall <julia@diku.dk> request_mem_region should be used with release_mem_region, not request_region. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r2@ expression start; @@ request_mem_region(start,…) @b2@ expression r2.start; @@ request_region(start,…) @depends on !b2@ expression r2.start; expression E; @@ – release_region + release_mem_region (start,E) // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller …

Continue reading

HID: fix memory leak on error patch in debug code

Author: Julia Lawall <julia@diku.dk> Error handling code following a kzalloc 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

Btrfs: correct error-handling zlib error handling

Author: Julia Lawall <julia@diku.dk> find_zlib_workspace returns an ERR_PTR value in an error case instead of NULL. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @match exists@ expression x, E; statement S1, S2; @@ x = find_zlib_workspace(…) … when != x = E ( * if (x == …

Continue reading

powerpc/fsl_rio: Add kmalloc NULL tests

Author: Julia Lawall <julia@diku.dk> Check that the result of kmalloc/kzalloc is not NULL before dereferencing it. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression *x; identifier f; constant char *C; @@ x = \(kmalloc\|kcalloc\|kzalloc\)(…); … when != x == NULL when != x != NULL when != (x || …

Continue reading

drivers/ata: use resource_size

Author: Julia Lawall <julia@diku.dk> Use the function resource_size, which reduces the chance of introducing off-by-one errors in calculating the resource size. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ struct resource *res; @@ – (res->end – res->start) + 1 + resource_size(res) // Signed-off-by: Julia Lawall Cc: Jeff Garzik Signed-off-by: Andrew …

Continue reading

drivers/mmc: correct error-handling code

Author: Julia Lawall <julia@diku.dk> sdhci_alloc_host returns an ERR_PTR value in an error case instead of NULL. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @match exists@ expression x, E; statement S1, S2; @@ x = sdhci_alloc_host(…) … when != x = E ( * if (x == …

Continue reading

drivers/w1/masters/omap_hdq.c: fix missing mutex unlock

Author: Stoyan Gaydarov <sgayda2@uiuc.edu> This was found using a semantic patch, more info can be found at: http://www.emn.fr/x-info/coccinelle/ Signed-off-by: Stoyan Gaydarov Acked-by: Evgeniy Polyakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — drivers/w1/masters/omap_hdq.c | 1 + 1 file changed, 1 insertion(+)   diff –git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index a7e3b70..0d92969 100644 — a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c @@ -687,6 +687,7 …

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.