linux/include
Andrew Morton 9970937273 net: don't use in_atomic() in gfp_any()
The problem is that in_atomic() will return false inside spinlocks if
CONFIG_PREEMPT=n.  This will lead to deadlockable GFP_KERNEL allocations
from spinlocked regions.

Secondly, if CONFIG_PREEMPT=y, this bug solves itself because networking
will instead use GFP_ATOMIC from this callsite.  Hence we won't get the
might_sleep() debugging warnings which would have informed us of the buggy
callsites.

Solve both these problems by switching to in_interrupt().  Now, if someone
runs a gfp_any() allocation from inside spinlock we will get the warning
if CONFIG_PREEMPT=y.

I reviewed all callsites and most of them were too complex for my little
brain and none of them documented their interface requirements.  I have no
idea what this patch will do.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-12 16:43:17 -08:00
..
acpi
asm-arm
asm-frv
asm-generic
asm-h8300
asm-m32r
asm-mn10300
crypto
drm
keys
linux pkt_sched: type should be __u32 in header 2009-02-10 17:18:17 -08:00
math-emu
media Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-02-02 19:26:06 -08:00
mtd headers_check fix: mtd/inftl-user.h 2009-01-31 00:13:34 +05:30
net net: don't use in_atomic() in gfp_any() 2009-02-12 16:43:17 -08:00
pcmcia
rdma
rxrpc
scsi
sound headers_check fix: sound/hdsp.h 2009-01-31 00:13:56 +05:30
trace
video headers_check fix: video/uvesafb.h 2009-01-31 00:14:52 +05:30
xen
Kbuild