freebsd-skq/sys
Mark Johnston 5a1e222bfd Close some races in multicast socket option handling.
r333175 converted the global multicast lock to a sleepable sx lock,
so the lock order with respect to the (non-sleepable) inp lock changed.
To handle this, r333175 and r333505 added code to drop the inp lock,
but this opened races that could leave multicast group description
structures in an inconsistent state.  This change fixes the problem by
simply acquiring the global lock sooner.  Along the way, this fixes
some LORs and bogus error handling introduced in r333175, and commits
some related cleanup.

Reported by:	syzbot+ba7c4943547e0604faca@syzkaller.appspotmail.com
Reported by:	syzbot+1b803796ab94d11a46f9@syzkaller.appspotmail.com
Reviewed by:	ae
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20070
2019-05-14 21:30:55 +00:00
..
amd64 Fix handling of r10 in Linux ptrace(2). This fixes decoding 2019-05-14 20:59:44 +00:00
arm arm: allwinner: aw_clk_nm: Don't reparent the clock if we didn't ask 2019-05-12 15:27:01 +00:00
arm64 Linuxulator depends on a fundamental kernel settings such as SMP. Many 2019-05-13 18:24:29 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Drop periph lock around cam_periph_unmapmem(). 2019-05-06 19:08:03 +00:00
cddl Add mutex_destroy() missed in r334844. 2019-04-26 19:02:21 +00:00
compat Linuxulator depends on a fundamental kernel settings such as SMP. Many 2019-05-13 18:24:29 +00:00
conf Specify -z notext when building with -z ifunc-noplt. 2019-05-14 18:26:39 +00:00
contrib Support the use of the ipsec kld. 2019-05-11 17:59:13 +00:00
crypto Embedded chacha: Add 0-bit iv + 128-bit counter mode 2019-03-01 23:30:23 +00:00
ddb ddb: Print the thread's pcb in 'show thread' 2019-02-09 21:08:19 +00:00
dev Mitigations for Microarchitectural Data Sampling. 2019-05-14 17:02:20 +00:00
dts arm64: Add support for NanoPI NEO2 2019-05-02 12:56:13 +00:00
fs Do not flush NFS node from NFS VOP_SET_TEXT(). 2019-05-06 08:49:43 +00:00
gdb
geom List-ify kernel dump device configuration 2019-05-06 18:24:07 +00:00
gnu dts: Import files from Linux 5.1 2019-05-08 19:27:30 +00:00
i386 Mitigations for Microarchitectural Data Sampling. 2019-05-14 17:02:20 +00:00
isa
kern Remove bpf interface lock, it is no longer exist. 2019-05-14 10:21:28 +00:00
kgssapi * Handle SIGPIPE in gssd 2019-02-21 01:30:37 +00:00
libkern random(4): depessimize arc4random 2019-05-12 06:32:46 +00:00
mips Catch up with r347241. 2019-05-13 01:18:17 +00:00
modules Add warning to the Linuxulator makefiles that building it outside of a 2019-05-13 18:28:40 +00:00
net tuntap: Defer clearing if_softc until after if_detach 2019-05-14 20:32:29 +00:00
net80211 net80211: correct check for SMPS node flags updates 2019-03-18 02:40:22 +00:00
netgraph Remove 'dir' argument in ng_ipfw_input, since ip_fw_args now has this info. 2019-03-14 22:30:05 +00:00
netinet Close some races in multicast socket option handling. 2019-05-14 21:30:55 +00:00
netinet6 Close some races in multicast socket option handling. 2019-05-14 21:30:55 +00:00
netipsec Replace read_random(9) with more appropriate arc4rand(9) KPIs 2019-04-04 01:02:50 +00:00
netpfil Add IPv6 support for O_IPLEN opcode. 2019-04-29 09:33:16 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Add new rates to ibcore. 2019-05-08 10:55:47 +00:00
opencrypto Don't panic for empty CCM requests. 2019-04-24 23:27:39 +00:00
powerpc powerpc: Initialize the Hardware Interrupt Offset Register (HIOR) earlier for ppc970 2019-05-10 19:36:14 +00:00
riscv Add support for HiFive Unleashed -- the board with a multi-core RISC-V SoC 2019-05-12 16:17:05 +00:00
rpc Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled. 2019-04-04 01:23:06 +00:00
security When MAC is enabled and a policy module is loaded, don't unconditionally 2019-05-03 20:38:43 +00:00
sparc64 Remove IPSEC from GENERIC due to performance issues 2019-05-09 22:38:15 +00:00
sys Add an UPDATING entry and bump __FreeBSD_version for r347532. 2019-05-13 18:48:08 +00:00
teken Attempt to complete fixing programmable function keys for syscons. 2019-02-20 02:14:41 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools Avoid literal @generated tag in file-generating scripts 2019-05-08 13:35:51 +00:00
ufs Ensure that error is initialized in ufs_bmap_seekdata(). 2019-05-05 16:57:03 +00:00
vm Restore the pre-r347532 behaviour of ignoring wiring failures in mmap(). 2019-05-13 18:40:01 +00:00
x86 Mitigations for Microarchitectural Data Sampling. 2019-05-14 17:02:20 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile