sahib / brig

File synchronization on top of ipfs with git like interface & web based UI
https://brig.readthedocs.io
GNU Affero General Public License v3.0
567 stars 33 forks source link

Potential race condition in fuse/file.go #55

Closed evgmik closed 3 years ago

evgmik commented 3 years ago

Cited from email exchange with @sahib

https://github.com/sahib/brig/blob/75286a246ebc18037285e464824f7d5d9e2eea6e/fuse/file.go#L102

Open() might be call in parallel if I remember the FUSE docs correctly.
Since there is no mutex fi.hd.writers might be incremented wrongly.
Note: I might be wrong here, my memory isn't the best.