linux/include/net
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
..
9p
bluetooth Bluetooth: Enable per-module dynamic debug messages 2008-11-30 12:17:28 +01:00
irda irda: Add irda_skb_cb qdisc related padding 2008-12-17 15:44:58 -08:00
iucv [S390] iucv: Locking free version of iucv_message_(receive|send) 2008-12-25 13:39:04 +01:00
netfilter
netns netns: ip6mr: declare reg_vif_num per-namespace 2008-12-10 16:29:24 -08:00
phonet Phonet: use atomic for packet TX window 2008-12-17 15:48:31 -08:00
sctp sctp: Fix crc32c calculations on big-endian arhes. 2009-01-22 14:52:23 -08:00
tc_act
tipc
act_api.h
addrconf.h
af_rxrpc.h
af_unix.h net: Fix soft lockups/OOM issues w/ unix garbage collector 2008-11-26 15:32:27 -08:00
ah.h
arp.h
atmclip.h
ax25.h
ax88796.h
cfg80211.h mac80211: Fix HT channel selection 2008-12-19 15:22:54 -05:00
checksum.h
cipso_ipv4.h netlabel: Update kernel configuration API 2008-12-31 12:54:11 -05:00
compat.h
datalink.h
dcbnl.h net: fix DCB setstate to return success/failure 2008-12-21 20:09:50 -08:00
dn_dev.h
dn_fib.h decnet: remove private wrappers of endian helpers 2008-11-27 00:12:47 -08:00
dn_neigh.h
dn_nsp.h
dn_route.h
dn.h decnet: compile fix for removal of byteorder wrapper 2008-11-27 23:04:13 -08:00
dsa.h
dsfield.h
dst.h netns xfrm: lookup in netns 2008-11-25 17:35:18 -08:00
esp.h
fib_rules.h
flow.h netns xfrm: lookup in netns 2008-11-25 17:35:18 -08:00
garp.h
gen_stats.h pkt_sched: gen_estimator: Optimize gen_estimator_active() 2008-11-26 15:24:32 -08:00
genetlink.h
icmp.h
ieee80211_radiotap.h wireless: clean up radiotap a bit 2008-12-05 09:32:59 -05:00
ieee80211.h ieee80211_security: correct warning about width of auth_mode 2008-12-12 13:48:30 -05:00
if_inet6.h
inet6_connection_sock.h
inet6_hashtables.h
inet_common.h
inet_connection_sock.h
inet_ecn.h
inet_frag.h
inet_hashtables.h net: wrong test in inet_ehash_locks_alloc() 2009-01-27 17:45:10 -08:00
inet_sock.h
inet_timewait_sock.h
inetpeer.h
ip6_checksum.h
ip6_fib.h
ip6_route.h
ip6_tunnel.h
ip_fib.h
ip_vs.h
ip.h netns xfrm: per-netns sysctls 2008-11-25 18:00:48 -08:00
ipcomp.h
ipconfig.h
ipip.h
ipv6.h
ipx.h
iw_handler.h
lapb.h
lib80211.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h
llc_if.h
llc_pdu.h
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
llc.h
mac80211.h mac80211: more kernel-doc fixes 2009-01-16 17:08:23 -05:00
mip6.h
ndisc.h ipv6: Fix sporadic sendmsg -EINVAL when sending to multicast groups. 2009-01-04 16:04:39 -08:00
neighbour.h
net_namespace.h
netdma.h net_dma: convert to dma_find_channel 2009-01-06 11:38:15 -07:00
netevent.h
netlabel.h netlabel: Update kernel configuration API 2008-12-31 12:54:11 -05:00
netlink.h netlink: fix (theoretical) overrun in message iteration 2008-12-25 17:21:17 -08:00
netrom.h
nexthop.h
p8022.h
pkt_cls.h
pkt_sched.h
protocol.h ipv6: Add GRO support 2009-01-08 10:40:57 -08:00
psnap.h
raw.h
rawv6.h
red.h
request_sock.h
rose.h
route.h
rtnetlink.h
sch_generic.h
scm.h
slhc_vj.h
snmp.h
sock.h net: don't use in_atomic() in gfp_any() 2009-02-12 16:43:17 -08:00
stp.h
tcp_states.h
tcp.h tcp: Add GRO support 2008-12-15 23:43:36 -08:00
timewait_sock.h
transp_v6.h
udp.h
udplite.h
wext.h
wimax.h wimax: fix typo in kernel-doc for debugfs_dentry in struct wimax_dev 2009-01-11 00:06:32 -08:00
wireless.h
x25.h
x25device.h
xfrm.h netns xfrm: per-netns sysctls 2008-11-25 18:00:48 -08:00