Re: KCSAN in fuse (fuse_request_end <-> fuse_request_end)

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

 



On Mon, Apr 29, 2024 at 04:18:56PM +0200, Miklos Szeredi wrote:
> On Fri, 26 Apr 2024 at 18:18, Breno Leitao <leitao@xxxxxxxxxx> wrote:
> 
> > fuse_request_end() reads and writes to ->num_background while holding
> > the bg_lock, but fuse_readahead() does not hold any lock before reading
> > ->num_background.  That is what KCSAN seems to be complaining about.
> >
> > Should we get ->bg_lock before reading ->num_background?
> 
> Probably not necessary.  Does wrapping that access in READ_ONCE() fix
> the complaint?

Yes, reading ->num_background using READ_ONCE() in the fuse_readahead()
path fix KCSAN complaint.

Should I sent it for review?

Thanks




[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