NetBSD/sys/net
tls 8cc016b4bc Protect calls to pool_put/pool_get that may occur in interrupt context
with spl used to protect other allocations and frees, or datastructure
element insertion and removal, in adjacent code.

It is almost unquestionably the case that some of the spl()/splx() calls
added here are superfluous, but it really seems wrong to see:

	s=splfoo();
	/* frob data structure */
	splx(s);
	pool_put(x);

and if we think we need to protect the first operation, then it is hard
to see why we should not think we need to protect the next.  "Better
safe than sorry".

It is also almost unquestionably the case that I missed some pool
gets/puts from interrupt context with my strategy for finding these
calls; use of PR_NOWAIT is a strong hint that a pool may be used from
interrupt context but many callers in the kernel pass a "can wait/can't
wait" flag down such that my searches might not have found them.  One
notable area that needs to be looked at is pf.

See also:

http://mail-index.netbsd.org/tech-kern/2006/07/19/0003.html
http://mail-index.netbsd.org/tech-kern/2006/07/19/0009.html
2006-10-05 17:35:19 +00:00
..
agr make a multiple inclusion protection macro match with the filename. 2006-07-08 05:57:41 +00:00
bpf_filter.c It is not sufficient for MINDEX to just 'return 0' if the MINDEX macro 2006-10-04 20:47:43 +00:00
bpf.c add missing initializer 2006-08-28 00:09:28 +00:00
bpf.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
bpfdesc.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
bridgestp.c Coverity CID 2728: Add KASSERT before NULL deref. 2006-04-15 02:38:19 +00:00
bsd-comp.c ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
dlt.h add missing DLTs from the libpcap-0.9.4 distribution 2006-02-27 14:22:26 +00:00
ethertypes.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
files.pf merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
if_arc.h argument type conflict. 2005-12-14 00:28:08 +00:00
if_arcsubr.c merge FreeBSD timecounters from branch simonb-timecounters 2006-06-07 22:33:33 +00:00
if_arp.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
if_atm.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_atmsubr.c ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_bridge.c Protect calls to pool_put/pool_get that may occur in interrupt context 2006-10-05 17:35:19 +00:00
if_bridgevar.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
if_dl.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_eco.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
if_ecosubr.c merge FreeBSD timecounters from branch simonb-timecounters 2006-06-07 22:33:33 +00:00
if_ether.h Add a new function called ether_snprintf() which takes an external buffer 2006-03-16 15:57:59 +00:00
if_ethersubr.c remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
if_faith.c Replace the comment that came from if_loop.c many years ago by 2006-01-31 22:27:15 +00:00
if_faith.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_fddi.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_fddisubr.c remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
if_gif.c Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
if_gif.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_gre.c remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
if_gre.h Rename gre_softc member sc_sp to sc_soparm to fix NetBSD/alpha 2006-09-01 01:34:05 +00:00
if_hippi.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_hippisubr.c merge FreeBSD timecounters from branch simonb-timecounters 2006-06-07 22:33:33 +00:00
if_ieee1394.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
if_ieee1394subr.c merge FreeBSD timecounters from branch simonb-timecounters 2006-06-07 22:33:33 +00:00
if_llc.h Comment out packed attributes that gcc 4 does not like. 2006-05-14 02:45:45 +00:00
if_loop.c remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
if_media.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
if_media.h Add IFM_10G_SR and IFM_10G_CX4, to keep in sync with FreeBSD. 2006-06-03 12:43:28 +00:00
if_ppp.c Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
if_ppp.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_pppoe.c Fix initializers. 2006-08-30 16:57:59 +00:00
if_pppoe.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
if_pppvar.h Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
if_sl.c Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
if_slvar.h merge FreeBSD timecounters from branch simonb-timecounters 2006-06-07 22:33:33 +00:00
if_sppp.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
if_spppsubr.c remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
if_spppvar.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
if_stf.c Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
if_stf.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_strip.c Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
if_stripvar.h merge FreeBSD timecounters from branch simonb-timecounters 2006-06-07 22:33:33 +00:00
if_tap.c Add a note about the use of CTL_CREATE in sysctl_createv, otherwise the 2006-09-01 16:28:53 +00:00
if_tap.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
if_token.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
if_tokensubr.c remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
if_tun.c remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
if_tun.h Change the number of TUN[GS]IFHEAD to avoid collision with if_pp. 2006-04-04 11:23:59 +00:00
if_types.h Integrate Common Address Redundancy Procotol (CARP) from OpenBSD 2006-05-18 09:05:49 +00:00
if_vlan.c Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
if_vlanvar.h merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
if.c One step closer to loadable domains. Store pointers to a domain's soft 2006-08-25 19:33:50 +00:00
if.h fully initialize IF_CLONE_INITIALIZER 2006-08-30 16:41:08 +00:00
Makefile Do not instal net/if_pppvar.h, net/if_slvar.h and net/if_stripvar.h. 2006-06-18 21:02:16 +00:00
net_osdep.h PR/19795: Joel Wilsson: net_osdep.h is lying. 2006-09-23 15:17:58 +00:00
netisr_dispatch.h remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
netisr.h remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
pfil.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
pfil.h Change "inline" back to "__inline" in .h files -- C99 is still too 2006-02-16 20:17:12 +00:00
pfkeyv2.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
ppp_defs.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
ppp_tty.c Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
ppp-comp.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
ppp-deflate.c ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
radix.c Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"), 2006-02-25 00:58:34 +00:00
radix.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
raw_cb.c ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
raw_cb.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
raw_usrreq.c Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
route.c Protect calls to pool_put/pool_get that may occur in interrupt context 2006-10-05 17:35:19 +00:00
route.h merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
rtsock.c Remove ugly (void *) casts from network scope authorization wrapper and 2006-09-19 21:42:29 +00:00
slcompress.c Perry reports that buf can be NULL, so deal with it. 2006-04-19 15:13:34 +00:00
slcompress.h ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
slip.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:21:38 +00:00
zlib.c quell GCC 4.1 uninitialised variable warnings. 2006-05-10 21:53:14 +00:00
zlib.h zlib 1.2.3 changed the include protection variable names; adjust. 2006-01-14 20:17:12 +00:00