mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
m68k: Fix off-by-one in m68k_setup_user_interrupt()
commit27123cbc26
upstream. commit69961c3752
("[PATCH] m68k/Atari: Interrupt updates") added a BUG_ON() with an incorrect upper bound comparison, which causes an early crash on VME boards, where IRQ_USER is 8, cnt is 192 and NR_IRQS is 200. Reported-by: Stephen N Chivers <schivers@csc.com.au> Tested-by: Kars de Jong <jongk@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
c56d539ed9
commit
c71aa7304a
@ -133,7 +133,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
|
||||
{
|
||||
int i;
|
||||
|
||||
BUG_ON(IRQ_USER + cnt >= NR_IRQS);
|
||||
BUG_ON(IRQ_USER + cnt > NR_IRQS);
|
||||
m68k_first_user_vec = vec;
|
||||
for (i = 0; i < cnt; i++)
|
||||
irq_controller[IRQ_USER + i] = &user_irq_controller;
|
||||
|
Loading…
Reference in New Issue
Block a user