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, Sep 27, 12:22 AM
Unknown Object (File)
Fri, Sep 26, 8:22 PM
Unknown Object (File)
Fri, Sep 26, 5:02 AM
Unknown Object (File)
Thu, Sep 25, 9:44 AM
Unknown Object (File)
Thu, Sep 18, 8:56 PM
Unknown Object (File)
Wed, Sep 17, 2:58 PM
Unknown Object (File)
Wed, Sep 17, 5:02 AM
Unknown Object (File)
Sep 14 2025, 10:16 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.