]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcontrol: fix percpu vmstats and vmevents flush
authorShakeel Butt <shakeelb@google.com>
Fri, 30 Aug 2019 23:04:53 +0000 (16:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 31 Aug 2019 01:00:50 +0000 (18:00 -0700)
commitc83bc469190e170c5eb1b6750dbf56376589c759
treecfb60fe945fbd4a35efe7d97a554d7cd0e164d10
parentf3755455d0232f7e35acee9ef9612b1b5cd17094
mm: memcontrol: fix percpu vmstats and vmevents flush

Instead of using raw_cpu_read() use per_cpu() to read the actual data of
the corresponding cpu otherwise we will be reading the data of the
current cpu for the number of online CPUs.

Link: http://lkml.kernel.org/r/20190829203110.129263-1-shakeelb@google.com
Fixes: ce6b59abbaa8 ("mm: memcontrol: flush percpu vmevents before releasing memcg")
Fixes: 412ac8b533e6 ("mm: memcontrol: flush percpu vmstats before releasing memcg")
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Roman Gushchin <guro@fb.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c