freebsd-skq/sys
bdrewery 76f617a279 lagg: Avoid adding a port to a lagg device being destroyed.
The lagg_clone_destroy() handles detach and waiting for ifconfig callers
to drain already.

This narrows the race for 2 panics that the tests triggered. Both were a
consequence of adding a port to the lagg device after it had already detached
from all of its ports. The link state task would run after lagg_clone_destroy()
free'd the lagg softc.

    kernel:trap_fatal+0xa4
    kernel:trap_pfault+0x61
    kernel:trap+0x316
    kernel:witness_checkorder+0x6d
    kernel:_sx_xlock+0x72
    if_lagg.ko:lagg_port_state+0x3b
    kernel:if_down+0x144
    kernel:if_detach+0x659
    if_tap.ko:tap_destroy+0x46
    kernel:if_clone_destroyif+0x1b7
    kernel:if_clone_destroy+0x8d
    kernel:ifioctl+0x29c
    kernel:kern_ioctl+0x2bd
    kernel:sys_ioctl+0x16d
    kernel:amd64_syscall+0x337

    kernel:trap_fatal+0xa4
    kernel:trap_pfault+0x61
    kernel:trap+0x316
    kernel:witness_checkorder+0x6d
    kernel:_sx_xlock+0x72
    if_lagg.ko:lagg_port_state+0x3b
    kernel:do_link_state_change+0x9b
    kernel:taskqueue_run_locked+0x10b
    kernel:taskqueue_run+0x49
    kernel:ithread_loop+0x19c
    kernel:fork_exit+0x83

PR:		244168
Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D25284
2020-08-13 22:06:27 +00:00
..
amd64 o Add machine/iommu.h and include MD iommu headers from it, 2020-08-05 19:11:31 +00:00
arm aw_cir: in the pulse encoding the actual length is one greater than value 2020-08-12 09:57:28 +00:00
arm64 Add support for Cortex-A76/Neoverse-N1 to hwpmc 2020-08-12 10:17:17 +00:00
bsm bsm: add AUE_CLOSERANGE 2020-04-24 01:27:25 +00:00
cam Fill device serial_num and device_id in NVMe XPT. 2020-08-13 02:32:46 +00:00
cddl Fix linker error in libuutil with recent LLVM 2020-08-07 16:04:21 +00:00
compat linprocfs: Fix some inaccuracies in meminfo. 2020-08-12 16:08:44 +00:00
conf Add prng(9) API 2020-08-13 20:48:14 +00:00
contrib Add prng(9) API 2020-08-13 20:48:14 +00:00
crypto padlock: fix Via Padlock with 192-bit keys 2020-07-20 16:12:14 +00:00
ddb [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00
dev Report cpi->hba_* for nda(4) because why not. 2020-08-12 20:05:43 +00:00
dts Remove licenses 2020-06-04 17:20:58 +00:00
fs Fix a bug introduced by r363001 for the ext_pgs case. 2020-08-12 04:35:49 +00:00
gdb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
geom Fix indentation. 2020-07-27 16:31:21 +00:00
gnu Import DTS files for arm, arm64, riscv from Linux 5.8 2020-08-04 19:44:43 +00:00
i386 o Add machine/iommu.h and include MD iommu headers from it, 2020-08-05 19:11:31 +00:00
isa
kern Add prng(9) API 2020-08-13 20:48:14 +00:00
kgssapi Add support for optional separate output buffers to in-kernel crypto. 2020-05-25 22:12:04 +00:00
libkern Add prng(9) API 2020-08-13 20:48:14 +00:00
mips Include virtio support in std.MALTA 2020-07-31 11:28:09 +00:00
modules Allow overriding the tool used for stripping binaries 2020-08-11 16:46:27 +00:00
net lagg: Avoid adding a port to a lagg device being destroyed. 2020-08-13 22:06:27 +00:00
net80211 net80211/ifconfig: print hardware device name for wlan interfaces 2020-08-07 12:24:23 +00:00
netgraph ng_iface(4): Remove unsupported protocols. 2020-07-31 14:08:54 +00:00
netinet TCP Cubic: Have Fast Convergence Heuristic work for ECN, and align concave region 2020-08-13 16:45:55 +00:00
netinet6 Use a static initializer for the multicast free tasks. 2020-08-11 08:31:40 +00:00
netipsec Simplify IPsec transform-specific teardown. 2020-06-25 23:59:16 +00:00
netpfil ipfw: make the "frag" keyword accept additional options "mf", 2020-08-11 15:46:22 +00:00
netsmb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfs Transition from rtrequest1_fib() to rib_action(). 2020-07-21 19:56:13 +00:00
nfsclient
nfsserver
nlm Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
ofed Infiniband clients must be attached and detached in a specific order in ibcore. 2020-07-06 08:50:11 +00:00
opencrypto Add support for KTLS RX via software decryption. 2020-07-23 23:48:18 +00:00
powerpc Fix clang 11 inline asm constraint error when building powerpc GENERIC64 2020-08-07 19:32:54 +00:00
riscv Enable interrupts while handling traps 2020-08-13 14:21:05 +00:00
rpc Add an argument to newnfs_connect() that indicates use TLS for the connection. 2020-08-11 00:26:45 +00:00
security vfs: add VOP_STAT 2020-08-07 23:06:40 +00:00
sys Add prng(9) API 2020-08-13 20:48:14 +00:00
teken
tests Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tools makesyscalls.lua: improve syscall ordering validation 2020-08-04 21:49:13 +00:00
ufs vfs: clean MNTK_FPLOOKUP if MNT_UNION is set 2020-08-10 11:51:21 +00:00
vm Back out unrelated change 2020-08-12 00:21:30 +00:00
x86 Move dmar_domain_unload_task to busdma_iommu.c. 2020-08-06 12:49:25 +00:00
xdr Split XDR into separate kernel module. Make krpc depend on xdr. 2020-04-17 06:04:20 +00:00
xen Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many) 2020-02-25 19:04:39 +00:00
Makefile