Page MenuHomeFreeBSD

lindebugfs: check that name is set as otherwise pfs_alloc_node_flags() panics
ClosedPublic

Authored by bz on Jan 29 2026, 6:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 9, 12:28 AM
Unknown Object (File)
Mon, Mar 2, 2:07 AM
Unknown Object (File)
Sun, Mar 1, 6:42 PM
Unknown Object (File)
Sun, Mar 1, 10:03 AM
Unknown Object (File)
Sat, Feb 14, 4:03 PM
Unknown Object (File)
Feb 6 2026, 3:46 AM
Unknown Object (File)
Feb 2 2026, 11:29 PM
Unknown Object (File)
Feb 2 2026, 9:06 PM
Subscribers

Details

Summary

I have hit the case multiple times that some LinuxKPI field may not be
set during driver bringup and lindebugfs would cause a panic.
The backtrace goes like:

strlen() at strlen+0x54
pfs_create_dir() at pfs_create_dir+0x41
debugfs_create_dir() at debugfs_create_dir+0xa1
...

We likely should at least add an assert to pfs_create_dir() if
name is NULL like we have for pfs_add_node() but for lindebugfs at
least make this a graceful error and continue without creating
the dir instead of panicing.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

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