Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2016-03-03 13:44:46 +0100
committerJiri Kosina <jkosina@suse.cz>2016-03-03 13:56:15 +0100
commit7bdad2ea5cb887c45de53f11d72f7838d58f1431 (patch)
tree7d0b841b6bc8fb7da6651480fad5db3de3a31ce2
parentc1b7e5d7b15aa510d1ee160c7696111d596921cf (diff)
parentb8ad209f8f4c490bad9314494d62ab073ea92b8f (diff)
Merge branch 'SLE11-SP3' into SLE11-SP4
Conflicts: patches.drivers/tg3-0021-tg3-5715-does-not-link-up-when-autoneg-off.patch
-rw-r--r--patches.suse/mm-memcg-print-statistics-from-live-counters-fix.patch50
-rw-r--r--series.conf1
2 files changed, 51 insertions, 0 deletions
diff --git a/patches.suse/mm-memcg-print-statistics-from-live-counters-fix.patch b/patches.suse/mm-memcg-print-statistics-from-live-counters-fix.patch
new file mode 100644
index 0000000000..31917b0a2d
--- /dev/null
+++ b/patches.suse/mm-memcg-print-statistics-from-live-counters-fix.patch
@@ -0,0 +1,50 @@
+From: Michal Hocko <mhocko@suse.cz>
+Subject: mm-memcg-print-statistics-from-live-counters-fix
+Patch-mainline: never, suse specific
+References: bnc#969307
+
+patches.suse/mm-memcg-print-statistics-from-live-counters.patch silently
+depends on 619d094b5872 ("memcg: simplify move_account() check") which has
+removed MEM_CGROUP_ON_MOVE and so MEM_CGROUP_STAT_NSTATS and
+MEM_CGROUP_STAT_DATA became the same thing. We do not have that patch
+backported and so any loop over all MEM_CGROUP_STAT_NSTATS and access
+mem_cgroup_stat_names will touch outside of the array.
+
+Fix this by using MEM_CGROUP_STAT_DATA when we have to access
+mem_cgroup_stat_names.
+
+Signed-off-by: Michal Hocko <mhocko@suse.cz>
+
+---
+ mm/memcontrol.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/mm/memcontrol.c
++++ b/mm/memcontrol.c
+@@ -1451,7 +1451,7 @@ done:
+ rcu_read_unlock();
+ pr_cont(":");
+
+- for (i = 0; i < MEM_CGROUP_STAT_NSTATS; i++) {
++ for (i = 0; i < MEM_CGROUP_STAT_DATA; i++) {
+ if (i == MEM_CGROUP_STAT_SWAP && !do_swap_account)
+ continue;
+ pr_cont(" %s:%ldKB", mem_cgroup_stat_names[i],
+@@ -4229,7 +4229,7 @@ static int mem_control_stat_show(struct
+ struct mem_cgroup *mi;
+ unsigned int i;
+
+- for (i = 0; i < MEM_CGROUP_STAT_NSTATS; i++) {
++ for (i = 0; i < MEM_CGROUP_STAT_DATA; i++) {
+ if (i == MEM_CGROUP_STAT_SWAP && !do_swap_account)
+ continue;
+ seq_printf(m, "%s %ld\n", mem_cgroup_stat_names[i],
+@@ -4254,7 +4254,7 @@ static int mem_control_stat_show(struct
+ memsw_limit);
+ }
+
+- for (i = 0; i < MEM_CGROUP_STAT_NSTATS; i++) {
++ for (i = 0; i < MEM_CGROUP_STAT_DATA; i++) {
+ long long val = 0;
+
+ if (i == MEM_CGROUP_STAT_SWAP && !do_swap_account)
diff --git a/series.conf b/series.conf
index 2f44e4da55..96f8102172 100644
--- a/series.conf
+++ b/series.conf
@@ -1727,6 +1727,7 @@
patches.suse/mm-memcg-print-statistics-from-live-counters.patch
patches.suse/memcg-rename-MEM_CGROUP_STAT_SWAPOUT-as-MEM_CGROUP_S.patch
patches.suse/memcg-oom-provide-more-precise-dump-info-while-memcg.patch
+ patches.suse/mm-memcg-print-statistics-from-live-counters-fix.patch
patches.fixes/writeback-do-not-sort-b_io-list-only-because-of-bloc.patch
patches.fixes/writeback-queue_io-avoid-list-traversal.patch