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
F133950615: D50669.id156554.diff
Wed, Oct 29, 1:32 PM
F133946796: D50669.id156514.diff
Wed, Oct 29, 12:58 PM
F133945282: D50669.id156597.diff
Wed, Oct 29, 12:46 PM
F133944013: D50669.id156490.diff
Wed, Oct 29, 12:34 PM
F133943483: D50669.diff
Wed, Oct 29, 12:30 PM
Unknown Object (File)
Tue, Oct 28, 1:39 AM
Unknown Object (File)
Tue, Oct 21, 2:29 PM
Unknown Object (File)
Tue, Oct 21, 2:29 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.