Page MenuHomeFreeBSD

fusefs: correctly set lock owner during FUSE_SETLK
ClosedPublic

Authored by asomers on Jun 2 2021, 9:44 PM.
Tags
None
Referenced Files
F110316283: D30622.diff
Sun, Feb 16, 5:16 PM
Unknown Object (File)
Fri, Feb 7, 9:50 PM
Unknown Object (File)
Dec 11 2024, 7:50 PM
Unknown Object (File)
Dec 10 2024, 4:53 AM
Unknown Object (File)
Nov 26 2024, 3:54 AM
Unknown Object (File)
Nov 22 2024, 7:19 PM
Unknown Object (File)
Nov 16 2024, 6:36 PM
Unknown Object (File)
Nov 16 2024, 6:00 PM

Details

Summary

During FUSE_SETLK, the owner field should uniquely identify the calling
process. The fusefs module now sets it to the process's pid.
Previously, it expected the calling process to set it directly, which
was wrong.

libfuse also apparently expects the owner field to be set during
FUSE_GETLK, though I'm not sure why.

PR: 256005
Reported by: Agata <chogata@moosefs.pro>
MFC after: 2 weeks

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39675
Build 36564: arc lint + arc unit

Event Timeline

pfg, would you mind reviewing this change?

Hrm, it seems I had an inline comment that was never submitted.

tests/sys/fs/fusefs/locks.cc
281

Can you explain this part of the change (i.e., 0 instead of pid which was fake)

tests/sys/fs/fusefs/locks.cc
281

When I first wrote the test I thought that the caller of fcntl was supposed to set pid. But that was wrong. The kernel is supposed to set it, and we verify it on return.

This revision is now accepted and ready to land.Jun 25 2021, 2:48 AM