[Bug 294768] fdescfs: `fdesc_getattr` mutates `vp->v_type` to `VLNK` on first `stat()`, breaking subsequent `open()` of pipe-fd entries on `linrdlnk` mounts

[email protected]
Newsgroups gmane.os.freebsd.devel.file-systems
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294768

Konstantin Belousov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Konstantin Belousov <[email protected]> ---
So yes, I agree that removing the line that changes the vnode type in
fdescfs_getattr()
should be relatively innocent and perhaps indeed fixes lookups.  As I
understand the
problem, the VLNK vnode type triggers namei() to try to call VOP_READLINK() on
it.
This is perhapsd where the ENOENT comes from.

Also, I found it somewhat non-intuitive that stat() on fdescfs vnode changes
its type.

Note that this code was not added by me, it is there from times of BSD 4.4 (not
FreeBSD) at least.  I only removed conditional assignment on error == 0, since
fdescfs_getattr() cannot set error on that path.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.