From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: Tommy Reynolds <reynolds@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Can BUG() also be used "safely" in interrupts?
Date: Sat, 18 May 2002 20:58:02 +0200 [thread overview]
Message-ID: <20020518205802.F751@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <20020517090139.G635@nightmaster.csn.tu-chemnitz.de> <20020517092740.62b4d60b.reynolds@redhat.com>
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 ;-)
Regards
Ingo Oeser
--
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
prev parent reply other threads:[~2002-05-18 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-17 7:01 Can BUG() also be used "safely" in interrupts? Ingo Oeser
2002-05-17 14:27 ` Tommy Reynolds
2002-05-18 18:58 ` Ingo Oeser [this message]
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=20020518205802.F751@nightmaster.csn.tu-chemnitz.de \
--to=ingo.oeser@informatik.tu-chemnitz.de \
--cc=linux-kernel@vger.kernel.org \
--cc=reynolds@redhat.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