Page MenuHomeFreeBSD

pseudofs: make dup name an error instead of panic
ClosedPublic

Authored by kib on Jun 3 2025, 8:04 PM.
Tags
None
Referenced Files
F138028216: D50669.id156597.diff
Fri, Nov 28, 7:45 AM
F138016566: D50669.id156514.diff
Fri, Nov 28, 4:41 AM
F137952827: D50669.id156490.diff
Thu, Nov 27, 3:33 PM
Unknown Object (File)
Tue, Nov 25, 4:13 PM
Unknown Object (File)
Thu, Nov 6, 6:41 AM
Unknown Object (File)
Mon, Nov 3, 6:11 PM
Unknown Object (File)
Wed, Oct 29, 1:32 PM
Unknown Object (File)
Wed, Oct 29, 12:58 PM
Subscribers

Details

Summary
There are enough cases where the duplicate name is caused by dubious
hardware configuration.  Stopping the whole system instead of failing a
driver, or even a diagnostic subsystem in a driver, is more
user-friendly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Jun 3 2025, 8:04 PM
sys/fs/pseudofs/pseudofs.c
131–132

pfs_fileno_alloc() assumes that pn->pn_parent is set in some cases. It might be sufficient to temporarily assign pn->pn_parent, then clear it below if there is a conflict.

kib marked an inline comment as done.

Assign pn_parent for the time of allocating proto-ino.

des requested changes to this revision.Jun 4 2025, 5:54 AM
des added inline comments.
sys/fs/pseudofs/pseudofs.c
141
282

indentation looks suspect

This revision now requires changes to proceed.Jun 4 2025, 5:54 AM
kib marked an inline comment as done.Jun 4 2025, 6:17 AM
kib added inline comments.
sys/fs/pseudofs/pseudofs.c
282

Why? Can you provide specifics?

s/EINVAL/EEXIST/
Print the parent name as well.

markj added inline comments.
sys/fs/pseudofs/pseudofs.c
138
kib marked an inline comment as done.

Make comment the full sentence.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 5 2025, 10:43 PM
This revision was automatically updated to reflect the committed changes.