diff options
author | Eric Biggers <ebiggers@google.com> | 2019-10-21 22:49:03 +0200 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-11-06 21:33:15 +0100 |
commit | ff73c2c016f8569b728eb1e9ebfab383545e4d65 (patch) | |
tree | 878f712c354b45c9d251da651ab4b3440e175ba2 /include/sound/i2c.h | |
parent | docs: ioctl-number: document fscrypt ioctl numbers (diff) | |
download | linux-ff73c2c016f8569b728eb1e9ebfab383545e4d65.tar.xz linux-ff73c2c016f8569b728eb1e9ebfab383545e4d65.zip |
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 'include/sound/i2c.h')
0 files changed, 0 insertions, 0 deletions