Go to file
gdt 0c9c715c58 Fix FAST_IPSEC locking violation.
Without this change, using ESP tunnels with FAST_IPSEC on a 2-cpu i386
machine results in an mbuf leak.  This change was tested in netbsd-6.

When FAST_IPSEC is enabled and a tunnel is set up, after the
outer packet is stripped off, FAST_IPSEC queues the inner
packet on the appropriate queue (ipinstrq or ip6instrq).
These queues require the KERNEL_LOCK to be held before
using the queue, and the FAST_IPSEC code did not take the
KERNEL_LOCK as required.
KERNEL_LOCK and KERNEL_UNLOCK_ONE calls have been added.

If a struct ifnet instance is passed to the if_handoff
function which does this queuing, the interface's
if_start function may be called.  Some hardware devices
require KERNEL_LOCK to be held; others do not.  Looking
at the body of NetBSD code, other places where an if_start
function is called, KERNEL_LOCK is held.  Thus, the lock is
not released in if_handoff until after the if_start function
is called.  In practice, having the kernel lock when
if_start is called makes no difference - there is not
a single instance in all of the NetBSD code where
if_handoff is passed an instance of struct ifnet.

This commit is the work of Bev Schwartz of BBN.

Approved for Public Release, Distribution Unlimited
This material is based upon work supported by the Defense Advanced Research
Projects Agency and Space and Naval Warfare Systems Center, Pacific, under
Contract No. N66001-09-C-2073.
2013-05-09 19:21:50 +00:00
bin Document that a here-document can finish at an EOF as well as at the 2013-05-09 11:43:27 +00:00
common Don't worry about divide by 0 for kernel or standalone 2013-05-09 15:03:40 +00:00
compat MKCOMPAT support for earm. 2013-04-27 08:44:35 +00:00
crypto racoon default config is in /etc/racoon/racoon.conf 2013-05-08 20:03:02 +00:00
dist one less, 6 left. 2013-03-23 16:32:04 +00:00
distrib atf fixes, whitespace, sorting 2013-05-08 17:41:31 +00:00
doc no changes for tzcode2013c 2013-05-08 15:50:34 +00:00
etc Add an entry for scif0 serial. 2013-05-08 15:14:27 +00:00
external When checking for membership in the system group file don't forget to check 2013-05-09 15:25:44 +00:00
extsrc
games Fix same typo in the other file in which it occurs 2013-02-17 13:39:51 +00:00
gnu Don't depend on ctype.h pulling in sys/ctype_bits.h, do so explicitly. 2013-04-26 17:34:55 +00:00
include add the signal safe prototypes 2013-05-04 18:30:14 +00:00
lib New sentence, new line. Fix minus. Avoid <>. 2013-05-08 18:18:32 +00:00
libexec Remove redundant assignment. Hasn't been needed since 1999. 2013-05-09 15:47:34 +00:00
regress The sleeping test has been converted to ATF 2012-11-08 03:16:04 +00:00
rescue point pdisk to the right place 2013-03-24 19:18:37 +00:00
sbin Add an arch_endian entry for x86_64. 2013-05-05 15:59:42 +00:00
share Punctuation fixes, put FILES in a list. 2013-05-09 13:54:11 +00:00
sys Fix FAST_IPSEC locking violation. 2013-05-09 19:21:50 +00:00
tests Whitespace 2013-05-05 10:26:57 +00:00
tools Create a sanitise_includes function and use it everywhere it's needed. 2013-05-05 07:11:34 +00:00
usr.bin Simplify previous: instead of polluting the whole code with extra arguments 2013-05-08 00:34:50 +00:00
usr.sbin always allow hex where decimal is allowed. 2013-05-09 19:12:03 +00:00
x11 Revert previous: tsutsui noted that this file is for X11R6. 2012-07-12 12:43:06 +00:00
build.sh Support to build for epoc32 userland. 2013-05-01 13:11:59 +00:00
BUILDING regen 2012-11-08 15:25:01 +00:00
Makefile Add src/etc/Makefile.params, containing the definition of the 2012-12-03 13:53:28 +00:00
Makefile.inc
UPDATING more 2013-03-02 08:51:42 +00:00