opnsense-src/sys/dev/virtio
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
..
balloon Introduce vm_page_astate. 2019-12-10 18:14:50 +00:00
block virtio(4): Add PNP match metadata for virtio devices 2019-06-04 02:37:11 +00:00
console virtio(4): Add PNP match metadata for virtio devices 2019-06-04 02:37:11 +00:00
mmio virtio: Fix running on machines with memory above 0xffffffff 2019-07-26 19:16:02 +00:00
network vtnet: Pre-allocate debugnet data immediately 2020-01-08 10:06:32 +00:00
pci virtio: Fix running on machines with memory above 0xffffffff 2019-07-26 19:16:02 +00:00
random virtio_random(4): Drop no longer needed unload kludge 2019-12-30 01:40:59 +00:00
scsi VirtIO SCSI: validate seg_max on attach 2019-06-22 01:20:45 +00:00
virtio.c virtio(4): Expose PNP metadata through newbus 2019-06-04 02:34:59 +00:00
virtio.h virtio(4): Add PNP match metadata for virtio devices 2019-06-04 02:37:11 +00:00
virtio_bus_if.m Add VirtIO bus config_generation method 2018-02-19 19:28:24 +00:00
virtio_config.h Update VirtIO definitions from Linux virtio_config.h and virtio_ring.h headers 2018-06-17 20:45:48 +00:00
virtio_ids.h Sync VirtIO IDs with Linux 2018-01-14 06:03:40 +00:00
virtio_if.m
virtio_ring.h Update VirtIO definitions from Linux virtio_config.h and virtio_ring.h headers 2018-06-17 20:45:48 +00:00
virtqueue.c Add more virtqueue getter methods 2018-02-19 19:31:18 +00:00
virtqueue.h Add more virtqueue getter methods 2018-02-19 19:31:18 +00:00