Page MenuHomeFreeBSD

debugnet: fix an errant assertion
ClosedPublic

Authored by mhorne on May 12 2022, 3:47 PM.
Tags
None
Referenced Files
F81944887: D35179.diff
Tue, Apr 23, 1:53 PM
Unknown Object (File)
Mon, Apr 22, 12:29 PM
Unknown Object (File)
Mon, Apr 22, 7:01 AM
Unknown Object (File)
Sun, Mar 31, 12:15 AM
Unknown Object (File)
Sat, Mar 30, 11:48 PM
Unknown Object (File)
Feb 22 2024, 7:59 PM
Unknown Object (File)
Feb 22 2024, 7:01 PM
Unknown Object (File)
Feb 4 2024, 9:35 PM

Details

Summary

We may call debugnet_free() before g_debugnet_pcb_inuse is true,
specifically in the cases where the interface is down or does not
support debugnet. pcb->dp_drv_input is used to hold the real driver
if_input callback while debugnet is in use, so we can check the status
of this field in the assertion.

This can be triggered trivially by trying to configure netdump on an
unsupported interface at the ddb prompt.

Initializing the dp_drv_input field to NULL explicitly is not necessary
but helps display the intent.

PR: 263929
Reported by: Martin Filla <freebsd@sysctl.cz>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable