freebsd-dev/sys
Kristof Provost 29bfe2102d vtnet: Pre-allocate debugnet data immediately
Don't wait until the vtnet_debugnet_init() call happens, because at that
point we might already have allocated something from
vtnet_tx_header_zone.

Some systems showed this panic:

        vtnet0: link state changed to UP
        panic: keg vtnet_tx_hdr initialization after use.
        cpuid = 5
        time = 1578427700
        KDB: stack backtrace:
        db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe004db427f0
        vpanic() at vpanic+0x17e/frame 0xfffffe004db42850
        panic() at panic+0x43/frame 0xfffffe004db428b0
        uma_zone_reserve() at uma_zone_reserve+0xf6/frame 0xfffffe004db428f0
        vtnet_debugnet_init() at vtnet_debugnet_init+0x77/frame 0xfffffe004db42930
        debugnet_any_ifnet_update() at debugnet_any_ifnet_update+0x42/frame 0xfffffe004db42980
        do_link_state_change() at do_link_state_change+0x1b3/frame 0xfffffe004db429d0
        taskqueue_run_locked() at taskqueue_run_locked+0x178/frame 0xfffffe004db42a30
        taskqueue_run() at taskqueue_run+0x4d/frame 0xfffffe004db42a50
        ithread_loop() at ithread_loop+0x1d6/frame 0xfffffe004db42ab0
        fork_exit() at fork_exit+0x80/frame 0xfffffe004db42af0
        fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe004db42af0
        --- trap 0, rip = 0, rsp = 0, rbp = 0 ---
        KDB: enter: panic
        [ thread pid 12 tid 100011 ]
        Stopped at      kdb_enter+0x37: movq    $0,0x1084eb6(%rip)
        db>

Reviewed by:	cem, markj
Differential Revision:	https://reviews.freebsd.org/D23073
2020-01-08 10:06:32 +00:00
..
amd64 sysctl: mark more nodes as MPSAFE 2020-01-06 10:52:13 +00:00
arm Add #ifdef option-test wrappers around another call to an arm/unwind.c 2020-01-07 21:13:34 +00:00
arm64 Add more Arm arm64 CPU identification values 2020-01-06 20:57:59 +00:00
bsm Jail and capability mode for shm_rename; add audit support for shm_rename 2019-11-18 13:31:16 +00:00
cam vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
cddl zfs: plug a vnode reserve leak in zfs_make_xattrdir 2020-01-07 04:34:29 +00:00
compat vfs: reimplement deferred inactive to use a dedicated flag (VI_DEFINACT) 2020-01-07 15:56:24 +00:00
conf Work around lld's inability to handle undefined weak symbols on risc-v. 2020-01-07 23:18:31 +00:00
contrib [PowerPC] Clang powerpcspe build fixes 2019-12-27 05:01:13 +00:00
crypto Fix the armv8 crypto driver after r354170. 2019-10-30 10:41:10 +00:00
ddb sleep(9), sleepqueue(9): const'ify wchan pointers 2019-12-24 16:19:33 +00:00
dev vtnet: Pre-allocate debugnet data immediately 2020-01-08 10:06:32 +00:00
dts
fs vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
gdb [PPC] Handle qOffsets packet 2019-12-16 13:17:39 +00:00
geom vfs: reimplement deferred inactive to use a dedicated flag (VI_DEFINACT) 2020-01-07 15:56:24 +00:00
gnu Import DTS files for riscv from Linux 5.4 2019-12-03 09:12:53 +00:00
i386 Define a unified pmap structure for i386. 2020-01-07 15:59:31 +00:00
isa sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
kern vfs: handle doomed vnodes in vdefer_inactive 2020-01-07 20:24:21 +00:00
kgssapi
libkern random(9): Deprecate random(9), remove meaningless srandom(9) 2019-12-26 19:41:09 +00:00
mips Simplify arguments to signal handlers on mips. 2020-01-06 18:02:02 +00:00
modules Add support for i2c bus mux hardware. 2020-01-02 17:51:49 +00:00
net Fix rtsock route message generation for interface addresses. 2020-01-07 21:16:30 +00:00
net80211
netgraph netgraph/ng_bridge: Reestablish old ABI 2020-01-05 19:14:16 +00:00
netinet Do not define TCPOUTFLAGS in rack_bbr_common 2020-01-07 17:57:08 +00:00
netinet6 Fix rtsock route message generation for interface addresses. 2020-01-07 21:16:30 +00:00
netipsec Fix m_pullup() problem after removing PULLDOWN_TESTs and KAME EXT_*macros. 2019-12-01 00:22:04 +00:00
netpfil ipfw: Don't rollback state in alloc_table_vidx() if atomicity is not required. 2019-12-19 10:22:16 +00:00
netsmb
nfs vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
nfsclient
nfsserver
nlm vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
ofed Prevent potential underflow in ibcore. 2019-11-15 11:46:53 +00:00
opencrypto Add support for TLS 1.3 using AES-GCM to the OCF backend for KTLS. 2019-12-18 01:37:00 +00:00
powerpc powerpc: Remove 'sec' device from QORIQ64 config 2020-01-04 01:13:00 +00:00
riscv Work around lld's inability to handle undefined weak symbols on risc-v. 2020-01-07 23:18:31 +00:00
rpc Change r355157 to make svc_rpc_gss_lifetime_max a static. 2019-11-28 02:18:51 +00:00
security vfs: eliminate v_tag from struct vnode 2020-01-07 04:29:34 +00:00
sparc64 sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
sys vfs: reimplement deferred inactive to use a dedicated flag (VI_DEFINACT) 2020-01-07 15:56:24 +00:00
teken
tests
tools vfs: allow tail call optimisation in vops in the common case 2019-12-16 00:07:51 +00:00
ufs vfs: drop thread argument from vinactive 2020-01-05 00:59:47 +00:00
vm Fix uma boot pages calculations on NUMA machines that also don't have 2020-01-06 02:51:19 +00:00
x86 Introduce the concept of busdma tag templates. A template can be allocated 2019-12-24 14:48:46 +00:00
xdr
xen
Makefile