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)
Sun, Sep 20, 9:21 PM
Unknown Object (File)
Sat, Sep 19, 5:35 AM
Unknown Object (File)
Thu, Sep 10, 12:56 AM
Unknown Object (File)
Wed, Sep 9, 12:38 AM
Unknown Object (File)
Tue, Sep 8, 1:01 PM
Unknown Object (File)
Mon, Sep 7, 2:36 AM
Unknown Object (File)
Sat, Sep 5, 3:09 PM
Unknown Object (File)
Thu, Sep 3, 9:33 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