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
F167578975: D54944.diff
Sat, Aug 22, 8:23 PM
Unknown Object (File)
Wed, Aug 19, 4:22 AM
Unknown Object (File)
Wed, Aug 19, 4:21 AM
Unknown Object (File)
Fri, Aug 14, 7:43 AM
Unknown Object (File)
Fri, Aug 14, 12:01 AM
Unknown Object (File)
Tue, Aug 11, 10:57 PM
Unknown Object (File)
Tue, Aug 11, 10:55 PM
Unknown Object (File)
Mon, Aug 10, 4:04 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