Author: Vegard Nossum <vegard.nossum@gmail.com> A few functions in the ipath driver incorrectly use unsigned int to hold irq flags for spin_lock_irqsave(). This patch was generated using the Coccinelle framework with the following semantic patch: The semantic patch I used was this: @@ expression lock; identifier flags; expression subclass; @@ – unsigned int flags; + unsigned …
Catégorie : Linux
Jul 30 2008
drivers/video: release mutex in error handling code
Author: Julia Lawall <julia@diku.dk> The mutex is released on a successful return, so it would seem that it should be released on an error return as well. The semantic patch finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression l; @@ mutex_lock(l); … when != mutex_unlock(l) when any when strict ( if (…) { …
Jul 29 2008
PS3: gelic: use unsigned long for irqflags
Author: Vegard Nossum <vegard.nossum@gmail.com> The semantic patch I used was this: @@ expression lock; identifier flags; expression subclass; @@ – unsigned int flags; + unsigned long flags; … This patch was generated using the Coccinelle framework. Cc: Masakazu Mokuno Cc: Julia Lawall Cc: Alexey Dobriyan Signed-off-by: Vegard Nossum Signed-off-by: John W. Linville — drivers/net/ps3_gelic_wireless.c | …
Jul 26 2008
[CPUFREQ] drivers/cpufreq/cpufreq.c: Adjust error handling code involving cpufreq_cpu_put
Author: Julia Lawall <julia@diku.dk> After calling cpufreq_cpu_get, error handling code should call cpufreq_cpu_put. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r@ expression x,E; statement S; position p1,p2,p3; @@ ( if ((x = cpufreq_cpu_get@p1(…)) == NULL || …) S | x = cpufreq_cpu_get@p1(…) … when != x if (x == NULL …
Jul 26 2008
fs/nfsd/export.c: Adjust error handling code involving auth_domain_put
Author: Julia Lawall <julia@diku.dk> Once clp is assigned, it never becomes NULL, so we can make a label for it in the error handling code. Because the call to path_lookup follows the call to auth_domain_find, its error handling code should jump to this new label. The semantic match that finds this problem is as follows: …
Jul 23 2008
IB/ehca: Release mutex in error path of alloc_small_queue_page()
Author: Julia Lawall <julia@diku.dk> The pd->lock mutex is released on a successful return, so it should be released on an error return as well. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression l; @@ mutex_lock(l); … when != mutex_unlock(l) when any when strict ( if (…) { … when …
Jul 22 2008
KVM: ia64: Fix irq disabling leak in error handling code
Author: Julia Lawall <julia@diku.dk> There is a call to local_irq_restore in the normal exit case, so it would seem that there should be one on an error return as well. The semantic patch that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression l; expression E,E1,E2; @@ local_irq_save(l); … when != local_irq_restore(l) when != …
Jul 21 2008
b43legacy: Release mutex in error handling code
Author: Julia Lawall <julia@diku.dk> The mutex is released on a successful return, so it would seem that it should be released on an error return as well. The semantic patch finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression l; @@ mutex_lock(l); … when != mutex_unlock(l) when any when strict ( if (…) { …
Jul 21 2008
[PATCH] ocfs2: Release mutex in error handling code
Author: Julia Lawall <julia@diku.dk> The mutex is released on a successful return, so it would seem that it should be released on an error return as well. The semantic patch finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression l; @@ mutex_lock(l); … when != mutex_unlock(l) when any when strict ( if (…) { …
Jul 21 2008
[SCSI] scsi_scan.c: Release mutex in error handling code
Author: Julia Lawall <julia@diku.dk> The mutex is released on a successful return, so it would seem that it should be released on an error return as well. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression l; @@ mutex_lock(l); … when != mutex_unlock(l) when any when strict ( if (…) …