[lkml]   [2002]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Can BUG() also be used "safely" in interrupts?
On Fri, May 17, 2002 at 09:27:40AM -0500, Tommy Reynolds wrote:
> BUG() is overkill here, since it breaks all existing spin locks trying to get
> the error message printed by the kernel. Instead, why not just:
> printk( KERN_WARN "spurious interrupt from my device\n" );
> like everyone else does?

That's what I do now.

> Keep in mind that if you are sharing an interrupt vector, each
> and every interrupt handler gets called for each and every
> interrupt, so having the device driver check that the device to
> which it is attached is really generating an interrupt is
> simple good form.

This is already being done. But I do REALLY paranoid checking of
each and every parameter of every function that is not declared 'static'.

But in this case the caller of the function or the hardware is
doing really strange things and it should be fixed ASAP and this
is the best way to catch the caller ;-)


Ingo Oeser
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.073 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site