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)
Sat, Aug 16, 11:16 AM
Unknown Object (File)
Wed, Aug 6, 6:01 AM
Unknown Object (File)
Wed, Aug 6, 1:22 AM
Unknown Object (File)
Tue, Aug 5, 4:50 PM
Unknown Object (File)
Mon, Aug 4, 1:29 AM
Unknown Object (File)
Sun, Aug 3, 10:46 AM
Unknown Object (File)
Tue, Jul 22, 10:53 PM
Unknown Object (File)
Tue, Jul 22, 4:13 AM
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.