| To: | "David S. Miller" <davem@xxxxxxxxxx> |
|---|---|
| Subject: | Re: BUG or not? GFP_KERNEL with interrupts disabled. |
| From: | Linus Torvalds <torvalds@xxxxxxxxxxxxx> |
| Date: | Thu, 27 Mar 2003 10:04:52 -0800 (PST) |
| Cc: | shmulik.hen@xxxxxxxxx, <dane@xxxxxxxxxx>, <bonding-devel@xxxxxxxxxxxxxxxxxxxxx>, <bonding-announce@xxxxxxxxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <linux-net@xxxxxxxxxxxxxxx>, <mingo@xxxxxxxxxx>, <kuznet@xxxxxxxxxxxxx> |
| In-reply-to: | <20030327.095537.26269606.davem@xxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Thu, 27 Mar 2003, David S. Miller wrote:
>
> I do agree that we should obviously not run bottom halves with
> interrupts disabled
>
> Ok, so can we add a:
>
> if (irqs_disabled())
> BUG();
>
> check to do_softirq()?
I'd suggest making it a counting warning (with a static counter per
local-bh-enable macro expansion) and adding it to local_bh_enable() -
otherwise it will only BUG() when the (potentially rare) condition
happens - instead of always giving a nice backtrace of exact problem
spots.
Linus
|
| Previous by Date: | Re: BUG or not? GFP_KERNEL with interrupts disabled., David S. Miller |
|---|---|
| Next by Date: | Re: BUG or not? GFP_KERNEL with interrupts disabled., David S. Miller |
| Previous by Thread: | Re: BUG or not? GFP_KERNEL with interrupts disabled., David S. Miller |
| Next by Thread: | Re: BUG or not? GFP_KERNEL with interrupts disabled., David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |