freebsd-skq/sys
markj af69719726 Fix an LLE lookup race.
After the afdata read lock was converted to epoch(9), readers could
observe a linked LLE and block on the LLE while a thread was
unlinking the LLE.  The writer would then release the lock and schedule
the LLE for deferred free, allowing readers to continue and potentially
schedule the LLE timer.  By the point the timer fires, the structure is
freed, typically resulting in a crash in the callout subsystem.

Fix the problem by modifying the lookup path to check for the LLE_LINKED
flag upon acquiring the LLE lock.  If it's not set, the lookup fails.

PR:		234296
Reviewed by:	bz
Tested by:	sbruno, Victor <chernov_victor@list.ru>,
		Mike Andrews <mandrews@bit0.com>
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18906
2019-01-23 22:18:23 +00:00
..
amd64 linuxulator: fix stack memory disclosure in linux_sigaltstack 2019-01-21 16:25:40 +00:00
arm awg: fix soft reset failure with no link 2019-01-21 14:35:36 +00:00
arm64 [rpi] Reorganize spigen(4) overlays for Raspberry Pi 2019-01-16 01:08:34 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam [ata] Add workaround for KingDian S200 SSD crash on receiving TRIM command 2019-01-18 04:23:52 +00:00
cddl Change ZFS quotas to return EINVAL when not present (matches man page). 2019-01-11 02:53:46 +00:00
compat [ndis] Fix unregistered use of FPU by NDIS in kernel on amd64 2019-01-22 03:53:42 +00:00
conf Remove IEEE80211_AMPDU_AGE config option. 2019-01-20 15:17:56 +00:00
contrib dpaa: fix 32-bit build 2019-01-19 05:20:31 +00:00
crypto Generalize AES iov optimization 2018-12-13 04:40:53 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev Add USB quirk. 2019-01-23 18:53:13 +00:00
dts [rpi] Reorganize spigen(4) overlays for Raspberry Pi 2019-01-16 01:08:34 +00:00
fs nfs: Zero the buffers exported by NFSSVC_DUMPCLIENTS and DUMPLOCKS. 2019-01-21 23:54:33 +00:00
gdb
geom gmirror: Relocate DEVICE_FLAGS to adjacent lines 2019-01-23 16:44:21 +00:00
gnu Import DTS from Linux 4.20 2019-01-11 09:40:34 +00:00
i386 Remove IEEE80211_AMPDU_AGE config option. 2019-01-20 15:17:56 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Re-wrap long line after r341827. 2019-01-17 04:51:05 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Remove IEEE80211_AMPDU_AGE config option. 2019-01-20 15:17:56 +00:00
modules Add missing dependency to vmxnet3 Makefile and clean it up a bit otherwise. 2019-01-22 04:36:19 +00:00
net netmap: improvements to the netmap kloop (CSB mode) 2019-01-23 14:51:36 +00:00
net80211 net80211: turn channel mode check into assertion. 2019-01-23 13:17:03 +00:00
netgraph Allow ng_nat to be attached to a ethernet interface directly via ng_ether(4) 2018-12-17 16:00:35 +00:00
netinet Fix an LLE lookup race. 2019-01-23 22:18:23 +00:00
netinet6 Fix an LLE lookup race. 2019-01-23 22:18:23 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil pf: Validate psn_len in DIOCGETSRCNODES 2019-01-22 02:13:33 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
opencrypto Plug memory leak for AES_*_NIST_GMAC algorithms. 2018-12-13 08:59:51 +00:00
powerpc powerpc: Fix opaque irq data initialization 2019-01-19 04:47:19 +00:00
riscv Optimize RISC-V copyin(9)/copyout(9) routines. 2019-01-21 19:38:53 +00:00
rpc Add kern.rpc.gss.client_max, to make it possible to bump it easily. 2018-12-15 11:32:11 +00:00
security Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
sparc64 Remove IEEE80211_AMPDU_AGE config option. 2019-01-20 15:17:56 +00:00
sys Remove unused *_sysinit_flags() declarations. 2019-01-22 12:56:49 +00:00
teken Implement ECMA-48 "REP", some Linuxen have started emitting them recently. 2018-10-21 08:29:36 +00:00
tests epoch_test: fix compile 2018-07-15 00:31:17 +00:00
tools make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs Allocate pager bufs from UMA instead of 80-ish mutex protected linked list. 2019-01-15 01:02:16 +00:00
vm Correct uma_prealloc()'s use of domainset iterators after r339925. 2019-01-23 18:58:15 +00:00
x86 i386/PAE busdma: allow more bounce pages. 2019-01-18 13:43:11 +00:00
xdr
xen xen: legacy PVH fixes for the new interrupt count 2018-09-13 07:14:11 +00:00
Makefile