lkml.org 
[lkml]   [2006]   [Jun]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 4 Jun 2006 10:58:36 +0200
FromIngo Molnar <>
SubjectRe: [patch, -rc5-mm3] lock validator: fix ns83820.c irq-flags bug
* 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-04 11:01    [from the cache]
©2003-2008