diff options
author | Yinghai Lu <yinghai@kernel.org> | 2011-02-19 11:07:37 -0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-21 21:20:00 +0100 |
commit | ed4dea6e0e33a3e58d8b77b775a8f0e433e7a005 (patch) | |
tree | 99f3168f5307545e6107603431e877b5369f767f /kernel/irq/manage.c | |
parent | a61d825808a0ce9935afebc225dcd602d5339e14 (diff) | |
download | op-kernel-dev-ed4dea6e0e33a3e58d8b77b775a8f0e433e7a005.zip op-kernel-dev-ed4dea6e0e33a3e58d8b77b775a8f0e433e7a005.tar.gz |
genirq: Use IRQ_BITMAP_BITS as search size in irq_alloc_descs()
The runtime expansion of nr_irqs does not take into account that
bitmap_find_next_zero_area() returns "start" + size in case the search
for an matching zero area fails. That results in a start value which
can be completely off and is not covered by the following
expand_nr_irqs() and possibly outside of the absolute limit. But we
use it without further checking.
Use IRQ_BITMAP_BITS as the limit for the bitmap search and expand
nr_irqs when the start bit is beyond nr_irqs. So start is always
pointing to the correct area in the bitmap. nr_irqs is just the limit
for irq enumerations, not the real limit for the irq space.
[ tglx: Let irq_expand_nr_irqs() take the new upper end so we do not
expand nr_irqs more than necessary. Made changelog readable ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4D6014F9.8040605@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/manage.c')
0 files changed, 0 insertions, 0 deletions