diff options
author | Eric Biggers <ebiggers@google.com> | 2019-10-21 13:49:03 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-11-06 12:33:15 -0800 |
commit | ff73c2c016f8569b728eb1e9ebfab383545e4d65 (patch) | |
tree | 878f712c354b45c9d251da651ab4b3440e175ba2 /drivers/virt | |
parent | 065ab4c4701ff6e28785eb8172925fc3068cc15e (diff) | |
download | linux-ff73c2c016f8569b728eb1e9ebfab383545e4d65.tar.bz2 |
fscrypt: avoid data race on fscrypt_mode::logged_impl_name
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>
Diffstat (limited to 'drivers/virt')
0 files changed, 0 insertions, 0 deletions