Searched hist:ff73c2c016f8569b728eb1e9ebfab383545e4d65 (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/fs/crypto/ |
H A D | keysetup.c | diff ff73c2c016f8569b728eb1e9ebfab383545e4d65 Mon Oct 21 15:49:03 CDT 2019 Eric Biggers <ebiggers@google.com> 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>
|
H A D | fscrypt_private.h | diff ff73c2c016f8569b728eb1e9ebfab383545e4d65 Mon Oct 21 15:49:03 CDT 2019 Eric Biggers <ebiggers@google.com> 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>
|