From: Michael Ellerman Date: Wed, 2 Aug 2006 00:48:50 +0000 (+1000) Subject: [POWERPC] Fix loop logic in irq_alloc_virt() X-Git-Tag: v2.6.19-rc1~219^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e12514650b167f48e952d50315fd492d01d42988;p=pandora-kernel.git [POWERPC] Fix loop logic in irq_alloc_virt() There's a bug in irq_alloc_virt() if it's asked for more than 1 interrupt, if it can't find a slot it might look past the end of the irq_map. To be clear: the bug is that the continue affects the inner for loop, not the outer one, so i becomes j + 1 and then we continue the inner loop without checking if i is still <= limit. This fixes it. No one in the kernel actually calls this with count > 1, so it's not critical. Signed-off-by: Michael Ellerman Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed