mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Sam Varshavchik" <mrsam@courier-mta.com>
To: linux-kernel@vger.kernel.org
Cc: linux-smp@vger.kernel.org
Subject: [BUG] [PATCH] Infinite loop in arch/i386/kernel/io_apic.c
Date: Wed, 10 Oct 2001 02:04:26 GMT	[thread overview]
Message-ID: <courier.3BC3ACAA.000008AE@ny.email-scan.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

Good morning/afternoon/evening/night, 

I see that there was some debug code added to io_apic.c in kernel 2.4.6, 
that's compiled by default. 

It looks to me like there's a typo in the APIC_LOCKUP_DEBUG code that 
results in certain hardware setups potentially triggering an infinite loop, 
while holding the ioapic spinlock: namely when the irq_2_pin list contains 
more than one list member: the loop pointer gets reinitialized each time at 
the top of the loop - kablooey. 

After upgrading from 2.4.3 to 2.4.7, my 440GX motherboard (with a couple of 
PCI devices) keels over fast enough that even the NMI watchdog doesn't help, 
and the following patch fixes it. 

-- 
Sam 


[-- Attachment #2: linux-2.4.6-ioapicdebugfix.patch --]
[-- Type: text/plain, Size: 906 bytes --]

*** linux/arch/i386/kernel/io_apic.c.orig	Tue Oct  9 21:11:10 2001
--- linux/arch/i386/kernel/io_apic.c	Tue Oct  9 21:13:03 2001
***************
*** 1248,1261 ****
  	ack_APIC_irq();
  
  	if (!(v & (1 << (i & 0x1f)))) {
  #ifdef APIC_MISMATCH_DEBUG
  		atomic_inc(&irq_mis_count);
  #endif
  		spin_lock(&ioapic_lock);
  		__mask_and_edge_IO_APIC_irq(irq);
  #ifdef APIC_LOCKUP_DEBUG
! 		for (;;) {
! 			struct irq_pin_list *entry = irq_2_pin + irq;
  			unsigned int reg;
  
  			if (entry->pin == -1)
--- 1248,1264 ----
  	ack_APIC_irq();
  
  	if (!(v & (1 << (i & 0x1f)))) {
+ #ifdef APIC_LOCKUP_DEBUG
+ 		struct irq_pin_list *entry;
+ #endif
+ 
  #ifdef APIC_MISMATCH_DEBUG
  		atomic_inc(&irq_mis_count);
  #endif
  		spin_lock(&ioapic_lock);
  		__mask_and_edge_IO_APIC_irq(irq);
  #ifdef APIC_LOCKUP_DEBUG
! 		for (entry = irq_2_pin + irq;;) {
  			unsigned int reg;
  
  			if (entry->pin == -1)

                 reply	other threads:[~2001-10-10  2:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=courier.3BC3ACAA.000008AE@ny.email-scan.com \
    --to=mrsam@courier-mta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-smp@vger.kernel.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

all inboxes | Powered by JetHome®