linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Breno Leitao <leitao@debian.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: KCSAN in fuse (fuse_request_end <-> fuse_request_end)
Date: Mon, 29 Apr 2024 16:18:56 +0200	[thread overview]
Message-ID: <CAJfpeguNAEH88aKTSFbEdaa4neUbpXVkbr5-XiAkOEH6ZNUoHQ@mail.gmail.com> (raw)
In-Reply-To: <ZivTjbq+bLypnkPc@gmail.com>

On Fri, 26 Apr 2024 at 18:18, Breno Leitao <leitao@debian.org> 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?

Thanks,
Miklos

  reply	other threads:[~2024-04-29 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 16:17 KCSAN in fuse (fuse_request_end <-> fuse_request_end) Breno Leitao
2024-04-29 14:18 ` Miklos Szeredi [this message]
2024-04-29 17:34   ` Breno Leitao
2024-05-09 11:10     ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJfpeguNAEH88aKTSFbEdaa4neUbpXVkbr5-XiAkOEH6ZNUoHQ@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=leitao@debian.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).