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