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)
Sat, Apr 4, 10:15 PM
Unknown Object (File)
Wed, Mar 18, 1:19 PM
Unknown Object (File)
Mar 9 2026, 12:28 AM
Unknown Object (File)
Mar 2 2026, 2:07 AM
Unknown Object (File)
Mar 1 2026, 6:42 PM
Unknown Object (File)
Mar 1 2026, 10:03 AM
Unknown Object (File)
Feb 14 2026, 4:03 PM
Unknown Object (File)
Feb 6 2026, 3:46 AM
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