aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2008-11-14 02:10:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-15 14:36:06 -0500
commit27123cbc264de89ce6951b1b4c84c223eb0f1702 (patch)
tree81e4d2cab353fb1e6085850a8a9f1a41465fb944 /arch/m68k
parentfa0cfc202c4969ceed567b1567c2e5effe7fd28b (diff)
m68k: Fix off-by-one in m68k_setup_user_interrupt()
commit 69961c375288bdab7604e0bb1c8d22999bb8a347 ("[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> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/kernel/ints.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 7e8a0d394e61..761ee0440c99 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -133,7 +133,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
133{ 133{
134 int i; 134 int i;
135 135
136 BUG_ON(IRQ_USER + cnt >= NR_IRQS); 136 BUG_ON(IRQ_USER + cnt > NR_IRQS);
137 m68k_first_user_vec = vec; 137 m68k_first_user_vec = vec;
138 for (i = 0; i < cnt; i++) 138 for (i = 0; i < cnt; i++)
139 irq_controller[IRQ_USER + i] = &user_irq_controller; 139 irq_controller[IRQ_USER + i] = &user_irq_controller;