summaryrefslogtreecommitdiffstats
path: root/drivers/virt
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-10-21 13:49:03 -0700
committerEric Biggers <ebiggers@google.com>2019-11-06 12:33:15 -0800
commitff73c2c016f8569b728eb1e9ebfab383545e4d65 (patch)
tree878f712c354b45c9d251da651ab4b3440e175ba2 /drivers/virt
parent065ab4c4701ff6e28785eb8172925fc3068cc15e (diff)
downloadlinux-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