lkml.org 
[lkml]   [2019]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] fscrypt: avoid data race on fscrypt_mode::logged_impl_name
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

\
 
 \ /
  Last update: 2019-11-06 22:02    [W:0.691 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site