HomeFreeBSD

fusefs: avoid cache corruption with buggy fuse servers

Description

fusefs: avoid cache corruption with buggy fuse servers

The FUSE protocol allows the client (kernel) to cache a file's size, if the
server (userspace daemon) allows it. A well-behaved daemon obviously should
not change a file's size while a client has it cached. But a buggy daemon
might. If the kernel ever detects that that has happened, then it should
invalidate the entire cache for that file. Previously, we would not only
cache stale data, but in the case of a file extension while we had the size
cached, we accidentally extended the cache with zeros.

PR: 244178
Reported by: Ben RUBSON <ben.rubson@gmx.com>
Reviewed by: cem
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24012

Details

Provenance
asomersAuthored on
Reviewer
cem
Differential Revision
D24012: fusefs: avoid cache corruption with buggy fuse servers
Parents
rS358866: Welcome Nick O'Brien as a src committer.
Branches
Unknown
Tags
Unknown