public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Keith Owens <kaos@ocs.com.au>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	"Barry K. Nathan" <barryn@pobox.com>,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [patch, -rc5-mm3] lock validator: fix ns83820.c irq-flags bug
Date: Sun, 4 Jun 2006 10:58:36 +0200	[thread overview]
Message-ID: <20060604085836.GA8931@elte.hu> (raw)
In-Reply-To: <16537.1149411027@ocs3.ocs.com.au>


* Keith Owens <kaos@ocs.com.au> wrote:

> Ingo Molnar (on Sun, 4 Jun 2006 10:30:17 +0200) wrote:
> >2) allowing the nesting of hardware interrupts only 'spreads out'
> >the handling of the current ISR, causing extra cachemisses that would
> >otherwise not happen. Furthermore, on architectures where ISRs share
> >the kernel stacks, enabling interrupts in ISRs introduces a much
> >higher kernel-stack-nesting and thus kernel-stack-overflow risk.
> 
> It is worse than you think.  A third party network driver enabled 
> interrupts in its irq handler.  For reasons that are still not clear, 
> that allowed recursive interrupts from the same device.  Unexpected I 
> know, because the card's ISR should still have been masked, but the 
> stack trace said otherwise.  When multiple packets arrived for the 
> same driver it drove multiple levels of kernel functions to handle 
> them and completely blew the kernel stack, even though it was using a 
> separate IRQ stack.

ouch!

They seem to be quite rare in practice (Barry's was the only one so 
far), but when they happen they can be very nasty. So the lock validator 
creates some gentle pressure to get these fixed ;-) For the really 
really rare cases where the irq enabling is justified (mostly old, very 
slow hardware) it can be easily annotated for lockdep.

	Ingo

  reply	other threads:[~2006-06-04  8:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-04  8:30 [patch, -rc5-mm3] lock validator: fix ns83820.c irq-flags bug Ingo Molnar
2006-06-04  8:50 ` Keith Owens
2006-06-04  8:58   ` Ingo Molnar [this message]
     [not found] ` <1149411525.3109.73.camel@laptopd505.fenrus.org>
2006-06-04  9:53   ` [patch, -rc5-mm3] lock validator: fix ns83820.c irq-flags bug part 2 Barry K. Nathan
2006-06-04 10:08     ` [patch, -rc5-mm3] lock validator: fix ns83820.c irq-flags part 3 Arjan van de Ven
2006-06-04 10:11       ` Ingo Molnar
2006-06-04 10:16         ` Arjan van de Ven
2006-06-04 10:46       ` Barry K. Nathan
2006-06-04 11:02         ` Ingo Molnar

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=20060604085836.GA8931@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=barryn@pobox.com \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@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