| To: | torvalds@xxxxxxxxxxxxx |
|---|---|
| Subject: | Re: BUG or not? GFP_KERNEL with interrupts disabled. |
| From: | "David S. Miller" <davem@xxxxxxxxxx> |
| Date: | Thu, 27 Mar 2003 11:10:12 -0800 (PST) |
| Cc: | dane@xxxxxxxxxx, shmulik.hen@xxxxxxxxx, bonding-devel@xxxxxxxxxxxxxxxxxxxxx, bonding-announce@xxxxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-net@xxxxxxxxxxxxxxx, mingo@xxxxxxxxxx, kuznet@xxxxxxxxxxxxx |
| In-reply-to: | <Pine.LNX.4.44.0303271104270.31459-100000@home.transmeta.com> |
| References: | <Pine.LNX.4.33.0303271315010.30532-100000@dane-linux.aiinet.com> <Pine.LNX.4.44.0303271104270.31459-100000@home.transmeta.com> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
From: Linus Torvalds <torvalds@xxxxxxxxxxxxx>
Date: Thu, 27 Mar 2003 11:08:26 -0800 (PST)
So what the test SHOULD look like is this:
if (gfp_mask & __GFP_WAIT) {
if (in_atomic() || irqs_disabled()) {
static int count = 0;
...
}
}
which should catch all the cases we really care about.
Let's codify this "in_atomic() || irqs_disabled()" test into a macro
that everyone can use to test sleepability, ok?
|
| Previous by Date: | Re: BUG or not? GFP_KERNEL with interrupts disabled., Linus Torvalds |
|---|---|
| Next by Date: | Re: BUG or not? GFP_KERNEL with interrupts disabled., Linus Torvalds |
| Previous by Thread: | Re: BUG or not? GFP_KERNEL with interrupts disabled., Linus Torvalds |
| Next by Thread: | Re: BUG or not? GFP_KERNEL with interrupts disabled., Linus Torvalds |
| Indexes: | [Date] [Thread] [Top] [All Lists] |