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
Unknown Object (File)
Fri, Nov 28, 7:45 AM
Unknown Object (File)
Fri, Nov 28, 4:41 AM
Unknown Object (File)
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)
Oct 29 2025, 1:32 PM
Unknown Object (File)
Oct 29 2025, 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

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
147
269

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
269

Why? Can you provide specifics?

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

markj added inline comments.
sys/fs/pseudofs/pseudofs.c
144
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.