From: Sasha Levin Date: Mon, 3 Feb 2020 22:42:39 +0000 (-0500) Subject: fixes for 4.19 X-Git-Tag: v5.5.2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb3f3405847a955896b3afd821f74efb0dbdc0b3;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for 4.19 Signed-off-by: Sasha Levin --- 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 index 00000000000..e762eebe906 --- /dev/null +++ b/queue-4.19/mm-migrate.c-also-overwrite-error-when-it-is-bigger-.patch @@ -0,0 +1,53 @@ +From 2a6c2be9f2817dfbe7b307404998cc2c019e59ae Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Acked-by: Yang Shi +Cc: John Hubbard +Cc: Vlastimil Babka +Cc: Christoph Lameter +Cc: Michal Hocko +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..5370e433aa1 --- /dev/null +++ b/queue-4.19/perf-report-fix-no-libunwind-compiled-warning-break-.patch @@ -0,0 +1,58 @@ +From bbeec868007b96a92704a540fe42453a505c50c5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 8 Jan 2020 03:17:45 +0800 +Subject: perf report: Fix no libunwind compiled warning break s390 issue + +From: Jin Yao + +[ 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 +Reviewed-by: Thomas Richter +Tested-by: Thomas Richter +Acked-by: Jiri Olsa +Cc: Alexander Shishkin +Cc: Andi Kleen +Cc: Jin Yao +Cc: Kan Liang +Cc: Peter Zijlstra +Link: http://lore.kernel.org/lkml/20200107191745.18415-1-yao.jin@linux.intel.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Sasha Levin +--- + 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 + diff --git a/queue-4.19/series b/queue-4.19/series index 9537d44c515..5fda9db771b 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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