diff options
author | 2022-10-31 18:52:56 +0100 | |
---|---|---|
committer | 2022-10-31 15:30:11 -0400 | |
commit | 7ee47dcfff1835ff75a794d1075b6b5f5462cfed (patch) | |
tree | 42d8767ff75c33525b7bc0ba0a05e112b7958200 /net/unix/af_unix.c | |
parent | Linux 6.1-rc1 (diff) | |
download | wireguard-linux-7ee47dcfff1835ff75a794d1075b6b5f5462cfed.tar.xz wireguard-linux-7ee47dcfff1835ff75a794d1075b6b5f5462cfed.zip |
fs: use acquire ordering in __fget_light()
We must prevent the CPU from reordering the files->count read with the
FD table access like this, on architectures where read-read reordering is
possible:
files_lookup_fd_raw()
close_fd()
put_files_struct()
atomic_read(&files->count)
I would like to mark this for stable, but the stable rules explicitly say
"no theoretical races", and given that the FD table pointer and
files->count are explicitly stored in the same cacheline, this sort of
reordering seems quite unlikely in practice...
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions