https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244686

            Bug ID: 244686
           Summary: fusefs: fuse ops header's unique values aren't always
                    unique
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: b...@freebsd.org
          Reporter: asom...@freebsd.org

Every FUSE operation has a unique value in its header.  As the name implies,
these values are supposed to be unique among all outstanding operations.  And
sine FUSE_INTERRUPT is asynchronous and racy, it is desirable that the unique
values be unique among all operations that are "close in time".  But in our
module, they aren't always unique.  We inadvertently reuse them during fsync,
readdir, LISTXATTR, and WRITE.  The problem can be easily demonstrated like
this:

cd /usr/tests/sys/fs/fusefs
> ./xattr --gtest_filter=Listxattr.user -vv
Note: Google Test filter = Listxattr.user
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Listxattr
[ RUN      ] Listxattr.user
ACCESS      ino= 1 uid= 1000 gid= 1000 pid=  848 unique=2 len=48 buflen=48
mask=0x1
LOOKUP      ino= 1 uid= 1000 gid= 1000 pid=  848 unique=3 len=54 buflen=54
some_file.txt
LISTXATTR   ino=42 uid= 1000 gid= 1000 pid=  848 unique=4 len=48 buflen=48
size=0
LISTXATTR   ino=42 uid= 1000 gid= 1000 pid=  848 unique=4 len=48 buflen=48
size=28
[       OK ] Listxattr.user (3 ms)
[----------] 1 test from Listxattr (3 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (3 ms total)
[  PASSED  ] 1 test.


We should ensure that the value is regenerated during fdisp_refresh_vp().

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to