]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Mon, 3 Feb 2020 22:42:39 +0000 (17:42 -0500)
committerSasha Levin <sashal@kernel.org>
Mon, 3 Feb 2020 22:42:39 +0000 (17:42 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/mm-migrate.c-also-overwrite-error-when-it-is-bigger-.patch [new file with mode: 0644]
queue-4.19/perf-report-fix-no-libunwind-compiled-warning-break-.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/mm-migrate.c-also-overwrite-error-when-it-is-bigger-.patch b/queue-4.19/mm-migrate.c-also-overwrite-error-when-it-is-bigger-.patch
new file mode 100644 (file)
index 0000000..e762eeb
--- /dev/null
@@ -0,0 +1,53 @@
+From 2a6c2be9f2817dfbe7b307404998cc2c019e59ae Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 30 Jan 2020 22:11:14 -0800
+Subject: mm/migrate.c: also overwrite error when it is bigger than zero
+
+From: Wei Yang <richardw.yang@linux.intel.com>
+
+[ Upstream commit dfe9aa23cab7880a794db9eb2d176c00ed064eb6 ]
+
+If we get here after successfully adding page to list, err would be 1 to
+indicate the page is queued in the list.
+
+Current code has two problems:
+
+  * on success, 0 is not returned
+  * on error, if add_page_for_migratioin() return 1, and the following err1
+    from do_move_pages_to_node() is set, the err1 is not returned since err
+    is 1
+
+And these behaviors break the user interface.
+
+Link: http://lkml.kernel.org/r/20200119065753.21694-1-richardw.yang@linux.intel.com
+Fixes: e0153fc2c760 ("mm: move_pages: return valid node id in status if the page is already on the target node").
+Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
+Acked-by: Yang Shi <yang.shi@linux.alibaba.com>
+Cc: John Hubbard <jhubbard@nvidia.com>
+Cc: Vlastimil Babka <vbabka@suse.cz>
+Cc: Christoph Lameter <cl@linux.com>
+Cc: Michal Hocko <mhocko@kernel.org>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ mm/migrate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mm/migrate.c b/mm/migrate.c
+index 593557c107d23..70f8ad4ade3fd 100644
+--- a/mm/migrate.c
++++ b/mm/migrate.c
+@@ -1672,7 +1672,7 @@ out_flush:
+       err1 = do_move_pages_to_node(mm, &pagelist, current_node);
+       if (!err1)
+               err1 = store_status(status, start, current_node, i - start);
+-      if (!err)
++      if (err >= 0)
+               err = err1;
+ out:
+       return err;
+-- 
+2.20.1
+
diff --git a/queue-4.19/perf-report-fix-no-libunwind-compiled-warning-break-.patch b/queue-4.19/perf-report-fix-no-libunwind-compiled-warning-break-.patch
new file mode 100644 (file)
index 0000000..5370e43
--- /dev/null
@@ -0,0 +1,58 @@
+From bbeec868007b96a92704a540fe42453a505c50c5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 8 Jan 2020 03:17:45 +0800
+Subject: perf report: Fix no libunwind compiled warning break s390 issue
+
+From: Jin Yao <yao.jin@linux.intel.com>
+
+[ Upstream commit c3314a74f86dc00827e0945c8e5039fc3aebaa3c ]
+
+Commit 800d3f561659 ("perf report: Add warning when libunwind not
+compiled in") breaks the s390 platform. S390 uses libdw-dwarf-unwind for
+call chain unwinding and had no support for libunwind.
+
+So the warning "Please install libunwind development packages during the
+perf build." caused the confusion even if the call-graph is displayed
+correctly.
+
+This patch adds checking for HAVE_DWARF_SUPPORT, which is set when
+libdw-dwarf-unwind is compiled in.
+
+Fixes: 800d3f561659 ("perf report: Add warning when libunwind not compiled in")
+Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
+Reviewed-by: Thomas Richter <tmricht@linux.ibm.com>
+Tested-by: Thomas Richter <tmricht@linux.ibm.com>
+Acked-by: Jiri Olsa <jolsa@redhat.com>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Andi Kleen <ak@linux.intel.com>
+Cc: Jin Yao <yao.jin@intel.com>
+Cc: Kan Liang <kan.liang@linux.intel.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Link: http://lore.kernel.org/lkml/20200107191745.18415-1-yao.jin@linux.intel.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/perf/builtin-report.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
+index b2b6a96725445..5312c761a5dba 100644
+--- a/tools/perf/builtin-report.c
++++ b/tools/perf/builtin-report.c
+@@ -383,10 +383,10 @@ static int report__setup_sample_type(struct report *rep)
+                               PERF_SAMPLE_BRANCH_ANY))
+               rep->nonany_branch_mode = true;
+-#ifndef HAVE_LIBUNWIND_SUPPORT
++#if !defined(HAVE_LIBUNWIND_SUPPORT) && !defined(HAVE_DWARF_SUPPORT)
+       if (dwarf_callchain_users) {
+-              ui__warning("Please install libunwind development packages "
+-                          "during the perf build.\n");
++              ui__warning("Please install libunwind or libdw "
++                          "development packages during the perf build.\n");
+       }
+ #endif
+-- 
+2.20.1
+
index 9537d44c515d405f2d2f3e99f2da6e84c684390f..5fda9db771b88acbfed563ea2dcbbfe1413308cb 100644 (file)
@@ -69,3 +69,5 @@ seq_tab_next-should-increase-position-index.patch
 l2t_seq_next-should-increase-position-index.patch
 net-fix-skb-csum-update-in-inet_proto_csum_replace16.patch
 btrfs-do-not-zero-f_bavail-if-we-have-available-space.patch
+perf-report-fix-no-libunwind-compiled-warning-break-.patch
+mm-migrate.c-also-overwrite-error-when-it-is-bigger-.patch