Re: [PATCH] fuse: fix leaked ENOSYS error on first statx call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 14 Apr 2024 at 02:34, Danny Lin <danny@xxxxxxxxxxxx> wrote:
>
> FUSE attempts to detect server support for statx by trying it once and
> setting no_statx=1 if it fails with ENOSYS, but consider the following
> scenario:
>
> - Userspace (e.g. sh) calls stat() on a file
>   * succeeds
> - Userspace (e.g. lsd) calls statx(BTIME) on the same file
>   - request_mask = STATX_BASIC_STATS | STATX_BTIME
>   - first pass: sync=true due to differing cache_mask
>   - statx fails and returns ENOSYS
>   - set no_statx and retry
>   - retry sets mask = STATX_BASIC_STATS
>   - now mask == cache_mask; sync=false (time_before: still valid)
>   - so we take the "else if (stat)" path
>   - "err" is still ENOSYS from the failed statx call
>
> Fix this by zeroing "err" before retrying the failed call.

Thanks, applied.

Miklos




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux