Commit 656c1d66 authored by Janne Huttunen's avatar Janne Huttunen Committed by Xie XiuQi
Browse files

mm/vmstat.c: fix NUMA statistics updates

mainline inclusion
from mainline-4.20-rc3
commit 13c9aaf7
category: bugfix
bugzilla: 5955
CVE: NA

------------------------

Scan through the whole array to see if an update is needed.  While we're
at it, use sizeof() to be safe against any possible type changes in the
future.

The bug here is that we wouldn't sync per-cpu counters into global ones
if there was an update of numa_stats for higher cpus.  Highly
theoretical one though because it is much more probable that zone_stats
are updated so we would refresh anyway.  So I wouldn't bother to mark
this for stable, yet something nice to fix.

[mhocko@suse.com: changelog enhancement]
Link: http://lkml.kernel.org/r/1541601517-17282-1-git-send-email-janne.huttunen@nokia.com


Fixes: 1d90ca89 ("mm: update NUMA counter threshold size")
Signed-off-by: default avatarJanne Huttunen <janne.huttunen@nokia.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarJing xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: default avatarChen Wandun <chenwandun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent ed747dac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment