From: Julia Lawall Date: Tue, 22 Jul 2008 19:38:18 +0000 (+0200) Subject: KVM: ia64: Fix irq disabling leak in error handling code X-Git-Tag: v2.6.27-rc1~57^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cab7a1eeeb007be309cd99cf14407261a72d2418;p=pandora-kernel.git KVM: ia64: Fix irq disabling leak in error handling code 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 != spin_unlock_irqrestore(E,l) when any when strict ( if (...) { ... when != local_irq_restore(l) when != spin_unlock_irqrestore(E1,l) + local_irq_restore(l); return ...; } | if (...) + {local_irq_restore(l); return ...; + } | spin_unlock_irqrestore(E2,l); | local_irq_restore(l); ) // Signed-off-by: Julia Lawall Signed-off-by: Avi Kivity --- Reading git-diff-tree failed