]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix irq_free_virt by adjusting bounds before loop
authorMilton Miller <miltonm@bga.com>
Tue, 24 May 2011 20:34:18 +0000 (20:34 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 26 May 2011 03:38:59 +0000 (13:38 +1000)
commitd7ad1354b5bc2f3b79b8cbfaf1b35dbcaa296c43
tree4876c904feadff354e9da9c21ce7e6b6d77a458b
parentbda3ed99c8d5be4ac009c3568c5470d765d95d09
powerpc: Fix irq_free_virt by adjusting bounds before loop

Instead of looping over each irq and checking against the irq array
bounds, adjust the bounds before looping.

The old code will not free any irq if the irq + count is above
irq_virq_count because the test in the loop is testing irq + count
instead of irq + i.

This code checks the limits to avoid unsigned integer overflows.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/irq.c