linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@cse.unsw.edu.au>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Neil Brown <neilb@cse.unsw.edu.au>, ryan <ryan@netidea.com>,
	linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: Kernel 2.4.0test10 crash (RAID+SMP)
Date: Tue, 7 Nov 2000 09:19:12 +1100 (EST)	[thread overview]
Message-ID: <14855.11872.519531.583123@notabene.cse.unsw.edu.au> (raw)
In-Reply-To: message from Jeff Garzik on Monday November 6
In-Reply-To: <1459.973469046@kao2.melbourne.sgi.com> <3A060BE5.8877F477@netidea.com> <14854.8617.282831.205647@notabene.cse.unsw.edu.au> <3A067318.E9C6ADDF@mandrakesoft.com>

On Monday November 6, jgarzik@mandrakesoft.com wrote:
> Neil Brown wrote:
> > It looks like an interupt is happening while another interrupt is
> > happening, which should be impossible... but it isn't.
> 
> If multiple interrupts are hitting a single code path (like IDE irqs 14
> -and- 15), you definitely have to think about that.  The reentrancy
> guarantee only exists when a single IRQ is assigned to a single
> handler...
> 
> 	Jeff

Maybe I wasn't very clear in the description of the problem (it was a
busy day) and just hoped that the nature of the patch would make the
nature of the problem clear.

The b_end_io routine that raid1 attaches to io request buffer_heads
that are used for resyncing had a side effect of re-enabling
interrupts.  As it is called from an interrupt context, this is
clearly a bug.  It allowed another interrupt to be serviced before a
previous interrupt had been completed, which is a problem waiting to
happen.
In this case, it became a real problem because the first interrupt had
grabbed a spinlock (I didn't bother to discover which one) and the
second interrupt tried to grab the same spinlock. This produced the
deadlock which the NMI-Oopser detected and reported.

When I have (sometime today) convinced myself that I have found all
the spin_{,un}lock_irq() calls that could be called from interrupt
context and corrected them to spin_{,un}lock_irq{save,restore}()
calls, I will send the patch to Linus.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2000-11-06 22:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-05 21:08 Kernel 2.4.0test10 crash (RAID+SMP) ryan
2000-11-06  0:04 ` Keith Owens
2000-11-06  1:39   ` ryan
2000-11-06  3:12     ` Neil Brown
2000-11-06  0:09       ` ryan
2000-11-06  9:00       ` Jeff Garzik
2000-11-06  9:40         ` Andre Hedrick
2000-11-06 22:19         ` Neil Brown [this message]
2000-11-06 11:51 ` Jason Straight
2000-11-07  0:02 Ion Badulescu

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=14855.11872.519531.583123@notabene.cse.unsw.edu.au \
    --to=neilb@cse.unsw.edu.au \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=ryan@netidea.com \
    /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;
as well as URLs for NNTP newsgroup(s).