mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Rajesh Shah <rajesh.shah@intel.com>, Andi Kleen <ak@muc.de>,
	"Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>,
	"Luck, Tony" <tony.luck@intel.com>, Andrew Morton <akpm@osdl.org>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Badari Pulavarty <pbadari@gmail.com>
Subject: [PATCH 1/1] x86_64 irq:  Scream but don't die if we receive an unexpected irq
Date: Sun, 08 Oct 2006 23:41:59 -0600	[thread overview]
Message-ID: <m1psd2rqoo.fsf_-_@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0610061102010.3952@g5.osdl.org> (Linus Torvalds's message of "Fri, 6 Oct 2006 11:08:08 -0700 (PDT)")


Due to code bugs or misbehaving hardware it is possible that we
can receive an interrupt that we have not mapped into a linux irq.
Calling BUG when that happens is very rude, and if the problem
is mild enough prevents anything else from getting done.

So instead of calling BUG just scream loudly about the problem
and continue running.  We don't have enough knowledge to know
which interrupt triggered this behavior so we don't acknowledge it.
This will likely prevent a recurrence of the problem by jamming
up the works with an unacknowledged interrupt.

If the interrupt was something important it is quite possible
that nothing productive will happen past this point.  But
it is now at least possible to keep working if the kernel
can survive without the interrupt we dropped on the floor.

Solutions like irqpoll should generally make dropped irqs non-fatal.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/x86_64/kernel/irq.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index b8a407f..dff68eb 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -114,16 +114,16 @@ asmlinkage unsigned int do_IRQ(struct pt
 	irq_enter();
 	irq = __get_cpu_var(vector_irq)[vector];
 
-	if (unlikely(irq >= NR_IRQS)) {
-		printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
-					__FUNCTION__, irq);
-		BUG();
-	}
-
 #ifdef CONFIG_DEBUG_STACKOVERFLOW
 	stack_overflow_check(regs);
 #endif
-	generic_handle_irq(irq);
+
+	if (likely(irq < NR_IRQS))
+		generic_handle_irq(irq);
+	else
+		printk(KERN_EMERG "%s: %d.%d No irq handler for vector\n",
+			__func__, smp_processor_id(), vector);
+
 	irq_exit();
 
 	set_irq_regs(old_regs);
-- 
1.4.2.rc3.g7e18e-dirty


      parent reply	other threads:[~2006-10-09  5:44 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 21:22 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle IRQ -1" Muli Ben-Yehuda
2006-10-06 15:14 ` Eric W. Biederman
2006-10-06 15:50   ` Muli Ben-Yehuda
2006-10-06 16:20     ` Muli Ben-Yehuda
2006-10-06 19:00       ` Andrew Vasquez
2006-10-06 19:42         ` Andrew Morton
2006-10-06 20:02           ` Andrew Vasquez
2006-10-06 20:15             ` Linus Torvalds
2006-10-06 20:18             ` Andrew Morton
2006-10-06 20:42             ` Muli Ben-Yehuda
2006-10-06 20:14           ` Linus Torvalds
2006-10-06 19:53       ` Benjamin LaHaise
2006-10-06 17:47     ` Eric W. Biederman
2006-10-06 20:23       ` Muli Ben-Yehuda
2006-10-06 23:42         ` Eric W. Biederman
2006-10-07  8:03           ` Muli Ben-Yehuda
2006-10-07 16:52             ` Eric W. Biederman
2006-10-07 17:59               ` Muli Ben-Yehuda
2006-10-08 13:39                 ` [PATCH 0/3] x86_64 irq fixes Eric W. Biederman
2006-10-08 13:41                   ` [PATCH 1/3] i386/x86_64: FIX pci_enable_irq to set dev->irq to the irq number Eric W. Biederman
2006-10-08 13:43                     ` [PATCH 2/3] i386/x86_64: Remove global IO_APIC_VECTOR Eric W. Biederman
2006-10-08 13:47                       ` [PATCH 3/3] x86_64 irq: Allocate a vector across all cpus for genapic_flat Eric W. Biederman
2006-10-08 19:01                         ` Muli Ben-Yehuda
2006-10-08 18:59                   ` [PATCH 0/3] x86_64 irq fixes Muli Ben-Yehuda
2006-10-07 19:03               ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle IRQ -1" Linus Torvalds
2006-10-07 19:33                 ` Arjan van de Ven
2006-10-07 19:57                   ` Linus Torvalds
2006-10-09  6:06                     ` Eric W. Biederman
2006-10-09  7:40                       ` Arjan van de Ven
2006-10-09 14:46                         ` Eric W. Biederman
2006-10-09 15:28                           ` Protasevich, Natalie
2006-10-09 15:39                             ` Arjan van de Ven
2006-10-09 16:02                               ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannothandle " Protasevich, Natalie
2006-10-07 20:24                 ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle " Eric W. Biederman
2006-10-06 16:02   ` Linus Torvalds
2006-10-06 17:22     ` Eric W. Biederman
2006-10-06 18:08       ` Linus Torvalds
2006-10-06 18:48         ` Eric W. Biederman
2006-10-09  5:41         ` Eric W. Biederman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1psd2rqoo.fsf_-_@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=Natalie.Protasevich@UNISYS.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=muli@il.ibm.com \
    --cc=pbadari@gmail.com \
    --cc=rajesh.shah@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome