From: Greg Kroah-Hartman Date: Tue, 3 Mar 2020 17:07:38 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.19.108~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb415e34cc956298cb6a618e085d032bd10d2fc2;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: drivers-net-xgene-fix-the-order-of-the-arguments-of-alloc_etherdev_mqs.patch mm-huge_memory.c-use-head-to-check-huge-zero-page.patch padata-always-acquire-cpu_hotplug_lock-before-pinst-lock.patch perf-hists-browser-restore-esc-as-zoom-out-of-dso-thread-etc.patch --- diff --git a/queue-4.9/drivers-net-xgene-fix-the-order-of-the-arguments-of-alloc_etherdev_mqs.patch b/queue-4.9/drivers-net-xgene-fix-the-order-of-the-arguments-of-alloc_etherdev_mqs.patch new file mode 100644 index 00000000000..c8a1820e25c --- /dev/null +++ b/queue-4.9/drivers-net-xgene-fix-the-order-of-the-arguments-of-alloc_etherdev_mqs.patch @@ -0,0 +1,37 @@ +From 5a44c71ccda60a50073c5d7fe3f694cdfa3ab0c2 Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Sun, 26 Jan 2020 11:44:29 +0100 +Subject: drivers: net: xgene: Fix the order of the arguments of 'alloc_etherdev_mqs()' + +From: Christophe JAILLET + +commit 5a44c71ccda60a50073c5d7fe3f694cdfa3ab0c2 upstream. + +'alloc_etherdev_mqs()' expects first 'tx', then 'rx'. The semantic here +looks reversed. + +Reorder the arguments passed to 'alloc_etherdev_mqs()' in order to keep +the correct semantic. + +In fact, this is a no-op because both XGENE_NUM_[RT]X_RING are 8. + +Fixes: 107dec2749fe ("drivers: net: xgene: Add support for multiple queues") +Signed-off-by: Christophe JAILLET +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c ++++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +@@ -1711,7 +1711,7 @@ static int xgene_enet_probe(struct platf + int ret; + + ndev = alloc_etherdev_mqs(sizeof(struct xgene_enet_pdata), +- XGENE_NUM_RX_RING, XGENE_NUM_TX_RING); ++ XGENE_NUM_TX_RING, XGENE_NUM_RX_RING); + if (!ndev) + return -ENOMEM; + diff --git a/queue-4.9/mm-huge_memory.c-use-head-to-check-huge-zero-page.patch b/queue-4.9/mm-huge_memory.c-use-head-to-check-huge-zero-page.patch new file mode 100644 index 00000000000..9aff9da7e1c --- /dev/null +++ b/queue-4.9/mm-huge_memory.c-use-head-to-check-huge-zero-page.patch @@ -0,0 +1,36 @@ +From cb829624867b5ab10bc6a7036d183b1b82bfe9f8 Mon Sep 17 00:00:00 2001 +From: Wei Yang +Date: Thu, 30 Jan 2020 22:14:29 -0800 +Subject: mm/huge_memory.c: use head to check huge zero page + +From: Wei Yang + +commit cb829624867b5ab10bc6a7036d183b1b82bfe9f8 upstream. + +The page could be a tail page, if this is the case, this BUG_ON will +never be triggered. + +Link: http://lkml.kernel.org/r/20200110032610.26499-1-richardw.yang@linux.intel.com +Fixes: e9b61f19858a ("thp: reintroduce split_huge_page()") + +Signed-off-by: Wei Yang +Acked-by: Kirill A. Shutemov +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/huge_memory.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/huge_memory.c ++++ b/mm/huge_memory.c +@@ -2095,7 +2095,7 @@ int split_huge_page_to_list(struct page + unsigned long flags; + pgoff_t end; + +- VM_BUG_ON_PAGE(is_huge_zero_page(page), page); ++ VM_BUG_ON_PAGE(is_huge_zero_page(head), head); + VM_BUG_ON_PAGE(!PageLocked(page), page); + VM_BUG_ON_PAGE(!PageSwapBacked(page), page); + VM_BUG_ON_PAGE(!PageCompound(page), page); diff --git a/queue-4.9/padata-always-acquire-cpu_hotplug_lock-before-pinst-lock.patch b/queue-4.9/padata-always-acquire-cpu_hotplug_lock-before-pinst-lock.patch new file mode 100644 index 00000000000..e09bd231ad6 --- /dev/null +++ b/queue-4.9/padata-always-acquire-cpu_hotplug_lock-before-pinst-lock.patch @@ -0,0 +1,67 @@ +From 38228e8848cd7dd86ccb90406af32de0cad24be3 Mon Sep 17 00:00:00 2001 +From: Daniel Jordan +Date: Tue, 3 Dec 2019 14:31:11 -0500 +Subject: padata: always acquire cpu_hotplug_lock before pinst->lock + +From: Daniel Jordan + +commit 38228e8848cd7dd86ccb90406af32de0cad24be3 upstream. + +lockdep complains when padata's paths to update cpumasks via CPU hotplug +and sysfs are both taken: + + # echo 0 > /sys/devices/system/cpu/cpu1/online + # echo ff > /sys/kernel/pcrypt/pencrypt/parallel_cpumask + + ====================================================== + WARNING: possible circular locking dependency detected + 5.4.0-rc8-padata-cpuhp-v3+ #1 Not tainted + ------------------------------------------------------ + bash/205 is trying to acquire lock: + ffffffff8286bcd0 (cpu_hotplug_lock.rw_sem){++++}, at: padata_set_cpumask+0x2b/0x120 + + but task is already holding lock: + ffff8880001abfa0 (&pinst->lock){+.+.}, at: padata_set_cpumask+0x26/0x120 + + which lock already depends on the new lock. + +padata doesn't take cpu_hotplug_lock and pinst->lock in a consistent +order. Which should be first? CPU hotplug calls into padata with +cpu_hotplug_lock already held, so it should have priority. + +Fixes: 6751fb3c0e0c ("padata: Use get_online_cpus/put_online_cpus") +Signed-off-by: Daniel Jordan +Cc: Eric Biggers +Cc: Herbert Xu +Cc: Steffen Klassert +Cc: linux-crypto@vger.kernel.org +Cc: linux-kernel@vger.kernel.org +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/padata.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/kernel/padata.c ++++ b/kernel/padata.c +@@ -614,8 +614,8 @@ int padata_set_cpumask(struct padata_ins + struct cpumask *serial_mask, *parallel_mask; + int err = -EINVAL; + +- mutex_lock(&pinst->lock); + get_online_cpus(); ++ mutex_lock(&pinst->lock); + + switch (cpumask_type) { + case PADATA_CPU_PARALLEL: +@@ -633,8 +633,8 @@ int padata_set_cpumask(struct padata_ins + err = __padata_set_cpumasks(pinst, parallel_mask, serial_mask); + + out: +- put_online_cpus(); + mutex_unlock(&pinst->lock); ++ put_online_cpus(); + + return err; + } diff --git a/queue-4.9/perf-hists-browser-restore-esc-as-zoom-out-of-dso-thread-etc.patch b/queue-4.9/perf-hists-browser-restore-esc-as-zoom-out-of-dso-thread-etc.patch new file mode 100644 index 00000000000..df3599e43ca --- /dev/null +++ b/queue-4.9/perf-hists-browser-restore-esc-as-zoom-out-of-dso-thread-etc.patch @@ -0,0 +1,35 @@ +From 3f7774033e6820d25beee5cf7aefa11d4968b951 Mon Sep 17 00:00:00 2001 +From: Arnaldo Carvalho de Melo +Date: Mon, 16 Dec 2019 13:22:33 -0300 +Subject: perf hists browser: Restore ESC as "Zoom out" of DSO/thread/etc + +From: Arnaldo Carvalho de Melo + +commit 3f7774033e6820d25beee5cf7aefa11d4968b951 upstream. + +We need to set actions->ms.map since 599a2f38a989 ("perf hists browser: +Check sort keys before hot key actions"), as in that patch we bail out +if map is NULL. + +Reviewed-by: Jiri Olsa +Cc: Adrian Hunter +Cc: Namhyung Kim +Fixes: 599a2f38a989 ("perf hists browser: Check sort keys before hot key actions") +Link: https://lkml.kernel.org/n/tip-wp1ssoewy6zihwwexqpohv0j@git.kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman + +--- + tools/perf/ui/browsers/hists.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/tools/perf/ui/browsers/hists.c ++++ b/tools/perf/ui/browsers/hists.c +@@ -2930,6 +2930,7 @@ static int perf_evsel__hists_browse(stru + + continue; + } ++ actions->ms.map = map; + top = pstack__peek(browser->pstack); + if (top == &browser->hists->dso_filter) { + /* diff --git a/queue-4.9/series b/queue-4.9/series index 6c7b664e8c7..b1310e9e94a 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -44,3 +44,7 @@ namei-only-return-echild-from-follow_dotdot_rcu.patch kvm-check-for-a-bad-hva-before-dropping-into-the-ghc-slow-path.patch slip-stop-double-free-sl-dev-in-slip_open.patch tuntap-correctly-set-sockwq_async_nospace.patch +drivers-net-xgene-fix-the-order-of-the-arguments-of-alloc_etherdev_mqs.patch +perf-hists-browser-restore-esc-as-zoom-out-of-dso-thread-etc.patch +padata-always-acquire-cpu_hotplug_lock-before-pinst-lock.patch +mm-huge_memory.c-use-head-to-check-huge-zero-page.patch