diff options
author | Eric Dumazet <edumazet@google.com> | 2019-10-09 12:55:53 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-27 14:51:18 +0100 |
commit | 910699a81fe572b41cc23b46b0616ce7878f5237 (patch) | |
tree | 5e36555a8ed00f6e00b34fde818a88869cf17332 /include | |
parent | 5c1b003d22aba2ff0853f0e775c3cfa7e42522cd (diff) |
net: avoid possible false sharing in sk_leave_memory_pressure()
[ Upstream commit 503978aca46124cd714703e180b9c8292ba50ba7 ]
As mentioned in https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance
a C compiler can legally transform :
if (memory_pressure && *memory_pressure)
*memory_pressure = 0;
to :
if (memory_pressure)
*memory_pressure = 0;
Fixes: 0604475119de ("tcp: add TCPMemoryPressuresChrono counter")
Fixes: 180d8cd942ce ("foundations of per-cgroup memory pressure controlling.")
Fixes: 3ab224be6d69 ("[NET] CORE: Introducing new memory accounting interface.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions