summaryrefslogtreecommitdiff
path: root/mm/page_counter.c
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2020-04-02 07:07:20 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 19:35:28 +0300
commit15b42562d46debadaebd77ac1a647abae139a231 (patch)
tree870fb610282ff7f4506932768df358439298fc32 /mm/page_counter.c
parentf6f989c5cebcc38b2d28c5b5f045d9a0a2082a9b (diff)
downloadlinux-15b42562d46debadaebd77ac1a647abae139a231.tar.xz
mm, memcg: prevent memory.max load tearing
This one is a bit more nuanced because we have memcg_max_mutex, which is mostly just used for enforcing invariants, but we still need to READ_ONCE since (despite its name) it doesn't really protect memory.max access. On write (page_counter_set_max() and memory_max_write()) we use xchg(), which uses smp_mb(), so that's already fine. Signed-off-by: Chris Down <chris@chrisdown.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Roman Gushchin <guro@fb.com> Cc: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/50a31e5f39f8ae6c8fb73966ba1455f0924e8f44.1584034301.git.chris@chrisdown.name Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_counter.c')
0 files changed, 0 insertions, 0 deletions