summaryrefslogtreecommitdiff
path: root/fs/cifs/smb2glob.h
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-06-08 17:40:30 +0300
committerakpm <akpm@linux-foundation.org>2022-07-04 04:08:42 +0300
commitc8945306976f497802b208cf8f2cad4543868bc6 (patch)
tree52be9312a6af5bfc3e1688252c5247060ac89abe /fs/cifs/smb2glob.h
parent5e21f2d577cf174ced5fe9bdff67dcb70190d9f8 (diff)
downloadlinux-c8945306976f497802b208cf8f2cad4543868bc6.tar.xz
mm/swapfile: fix possible data races of inuse_pages
si->inuse_pages could still be accessed concurrently now. The plain reads outside si->lock critical section, i.e. swap_show and si_swapinfo, which results in data races. READ_ONCE and WRITE_ONCE is used to fix such data races. Note these data races should be ok because they're just used for showing swap info. [linmiaohe@huawei.com: use WRITE_ONCE to pair with READ_ONCE] Link: https://lkml.kernel.org/r/20220625093346.48894-2-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20220608144031.829-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: "Huang, Ying" <ying.huang@intel.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/cifs/smb2glob.h')
0 files changed, 0 insertions, 0 deletions