linux-fscrypt.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: "Theodore Y . Ts'o" <tytso@mit.edu>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fscrypt: avoid data race on fscrypt_mode::logged_impl_name
Date: Wed, 6 Nov 2019 13:02:05 -0800	[thread overview]
Message-ID: <20191106210204.GA139580@gmail.com> (raw)
In-Reply-To: <20191021204903.56528-1-ebiggers@kernel.org>

On Mon, Oct 21, 2019 at 01:49:03PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> The access to logged_impl_name is technically a data race, which tools
> like KCSAN could complain about in the future.  See:
> https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE
> 
> Fix by using xchg(), which also ensures that only one thread does the
> logging.
> 
> This also required switching from bool to int, to avoid a build error on
> the RISC-V architecture which doesn't implement xchg on bytes.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Applied to fscrypt.git#master for 5.5.

- Eric

      reply	other threads:[~2019-11-06 21:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 20:49 [PATCH v2] fscrypt: avoid data race on fscrypt_mode::logged_impl_name Eric Biggers
2019-11-06 21:02 ` Eric Biggers [this message]

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=20191106210204.GA139580@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).