freebsd-skq/sys
ae 565b5a2e9e Fix possible double releasing for SA and SP references.
There are two possible ways how crypto callback are called: directly from
caller and deffered from crypto thread.

For outbound packets the direct call chain is the following:
 IPSEC_OUTPUT() method -> ipsec[46]_common_output() ->
 -> ipsec[46]_perform_request() -> xform_output() ->
 -> crypto_dispatch() -> crypto_invoke() -> crypto_done() ->
 -> xform_output_cb() -> ipsec_process_done() -> ip[6]_output().

The SA and SP references are held while crypto processing is not finished.
The error handling code wrongly expected that crypto callback always called
from the crypto thread context, and it did references releasing in
xform_output_cb(). But when the crypto callback called directly, in case of
error the error handling code in ipsec[46]_perform_request() also did
references releasing.

To fix this, remove error handling from ipsec[46]_perform_request() and do it
in xform_output() before crypto_dispatch().

MFC after:	10 days
2017-05-23 09:32:26 +00:00
..
amd64 Bump default MAXTSIZ (kern.maxtsiz) from 128MB to 32GB. The old limit 2017-05-17 08:38:41 +00:00
arm Exclude ccr(4) from arm LINT since it excludes cxgbe(4). 2017-05-19 22:54:45 +00:00
arm64 Avoid use of contiguous memory allocations in busdma when possible. 2017-05-16 14:21:37 +00:00
boot Replacing iterating over rootpath by strsep(3). 2017-05-22 20:11:40 +00:00
bsm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
cam Add basic programmable early warning error injection to the sa(4) driver. 2017-05-05 20:00:53 +00:00
cddl Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
compat Regen. 2017-05-23 09:30:42 +00:00
conf Add support for Amazon Elastic Network Adapter (ENA) NIC 2017-05-22 14:46:13 +00:00
contrib Refactor & compact struct i6addr_t #ifdef: remove redundant structure 2017-05-22 03:01:35 +00:00
crypto Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
ddb Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
dev Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
fs Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
gdb
geom Fix typo. 2017-05-18 08:25:07 +00:00
gnu [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code. 2017-05-06 06:20:34 +00:00
i386 Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
isa Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kern Regen. 2017-05-23 09:30:42 +00:00
kgssapi
libkern Sync qsort.c with userland r318515. 2017-05-19 06:37:16 +00:00
mips [ar71xx] remove dead code! 2017-05-23 06:20:24 +00:00
modules Add support for Amazon Elastic Network Adapter (ENA) NIC 2017-05-22 14:46:13 +00:00
net Add parent interface reference counting to if_vlan. 2017-05-23 00:13:27 +00:00
net80211 [net80211] prepare for A-MSDU/A-MPDU offload crypto / sequence number checking. 2017-05-20 00:43:52 +00:00
netgraph Make cached Bluetooth LE host advertise information visible from userland. 2017-04-27 15:03:24 +00:00
netinet The connect() system call should return -1 and set errno to EAFNOSUPPORT 2017-05-22 15:29:10 +00:00
netinet6 The connect() system call should return -1 and set errno to EAFNOSUPPORT 2017-05-22 15:29:10 +00:00
netipsec Fix possible double releasing for SA and SP references. 2017-05-23 09:32:26 +00:00
netpfil Fix the queue delay estimation in PIE/FQ-PIE when the timestamp 2017-05-19 08:38:03 +00:00
netsmb
nfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsclient Add an NFSv4.1 mount option for "use one openowner". 2017-04-13 21:54:19 +00:00
nfsserver Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nlm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ofed All these files need sys/vmmeter.h, but now they got it implicitly 2017-04-17 17:07:00 +00:00
opencrypto Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
powerpc Add a driver for the Chelsio T6 crypto accelerator engine. 2017-05-17 22:13:07 +00:00
riscv Follow r317061 "Remove struct vmmeter from struct pcpu" 2017-04-19 17:06:32 +00:00
rpc Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
security Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
sparc64 fix sparc64 build by restoring 'register' in pcpu.h 2017-05-17 16:32:24 +00:00
sys Regen. 2017-05-23 09:30:42 +00:00
teken Oops, my fix for bright colors broke bright black some more (in cases 2017-03-27 10:48:28 +00:00
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools [fdt] Make DTBs generated by make_dtb.sh overlay-ready 2017-03-10 22:45:07 +00:00
ufs Remove spl() calls from UFS code. 2017-05-07 14:59:45 +00:00
vm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
x86 Avoid use of contiguous memory allocations in busdma when possible. 2017-05-16 14:21:37 +00:00
xdr
xen xenstore: fix suspension when using the xenstore device 2017-03-07 09:17:48 +00:00
Makefile Remove glimpse make target added in r181432 2017-05-22 15:53:30 +00:00