From: Greg Kroah-Hartman Date: Wed, 15 Apr 2020 10:17:40 +0000 (+0200) Subject: 5.6-stable patches X-Git-Tag: v4.19.116~48 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=3360a52683ec4265561eb9d67a3776bf0ed2770d;p=thirdparty%2Fkernel%2Fstable-queue.git 5.6-stable patches added patches: arm64-dts-allwinner-h5-fix-pmu-compatible.patch arm64-dts-allwinner-h6-fix-pmu-compatible.patch mm-memcg-do-not-high-throttle-allocators-based-on-wraparound.patch net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch sched-core-remove-duplicate-assignment-in-sched_tick_remote.patch scsi-mpt3sas-fix-kernel-panic-observed-on-soft-hba-unplug.patch tools-gpio-fix-out-of-tree-build-regression.patch --- diff --git a/queue-5.6/arm64-dts-allwinner-h5-fix-pmu-compatible.patch b/queue-5.6/arm64-dts-allwinner-h5-fix-pmu-compatible.patch new file mode 100644 index 00000000000..7f6447e9aab --- /dev/null +++ b/queue-5.6/arm64-dts-allwinner-h5-fix-pmu-compatible.patch @@ -0,0 +1,37 @@ +From 4ae7a3c3d7d31260f690d8d658f0365f3eca67a2 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Mon, 10 Feb 2020 10:55:59 +0100 +Subject: arm64: dts: allwinner: h5: Fix PMU compatible + +From: Maxime Ripard + +commit 4ae7a3c3d7d31260f690d8d658f0365f3eca67a2 upstream. + +The commit c35a516a4618 ("arm64: dts: allwinner: H5: Add PMU node") +introduced support for the PMU found on the Allwinner H5. However, the +binding only allows for a single compatible, while the patch was adding +two. + +Make sure we follow the binding. + +Fixes: c35a516a4618 ("arm64: dts: allwinner: H5: Add PMU node") +Signed-off-by: Maxime Ripard +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +@@ -38,8 +38,7 @@ + }; + + pmu { +- compatible = "arm,cortex-a53-pmu", +- "arm,armv8-pmuv3"; ++ compatible = "arm,cortex-a53-pmu"; + interrupts = , + , + , diff --git a/queue-5.6/arm64-dts-allwinner-h6-fix-pmu-compatible.patch b/queue-5.6/arm64-dts-allwinner-h6-fix-pmu-compatible.patch new file mode 100644 index 00000000000..ca1b55c4bf9 --- /dev/null +++ b/queue-5.6/arm64-dts-allwinner-h6-fix-pmu-compatible.patch @@ -0,0 +1,37 @@ +From 4c7eeb9af3e41ae7d840977119c58f3bbb3f4f59 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Mon, 10 Feb 2020 10:56:00 +0100 +Subject: arm64: dts: allwinner: h6: Fix PMU compatible + +From: Maxime Ripard + +commit 4c7eeb9af3e41ae7d840977119c58f3bbb3f4f59 upstream. + +The commit 7aa9b9eb7d6a ("arm64: dts: allwinner: H6: Add PMU mode") +introduced support for the PMU found on the Allwinner H6. However, the +binding only allows for a single compatible, while the patch was adding +two. + +Make sure we follow the binding. + +Fixes: 7aa9b9eb7d6a ("arm64: dts: allwinner: H6: Add PMU mode") +Signed-off-by: Maxime Ripard +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +@@ -70,8 +70,7 @@ + }; + + pmu { +- compatible = "arm,cortex-a53-pmu", +- "arm,armv8-pmuv3"; ++ compatible = "arm,cortex-a53-pmu"; + interrupts = , + , + , diff --git a/queue-5.6/mm-memcg-do-not-high-throttle-allocators-based-on-wraparound.patch b/queue-5.6/mm-memcg-do-not-high-throttle-allocators-based-on-wraparound.patch new file mode 100644 index 00000000000..6f3faea2fc7 --- /dev/null +++ b/queue-5.6/mm-memcg-do-not-high-throttle-allocators-based-on-wraparound.patch @@ -0,0 +1,60 @@ +From 9b8b17541f13809d06f6f873325305ddbb760e3e Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Fri, 10 Apr 2020 14:32:19 -0700 +Subject: mm, memcg: do not high throttle allocators based on wraparound + +From: Jakub Kicinski + +commit 9b8b17541f13809d06f6f873325305ddbb760e3e upstream. + +If a cgroup violates its memory.high constraints, we may end up unduly +penalising it. For example, for the following hierarchy: + + A: max high, 20 usage + A/B: 9 high, 10 usage + A/C: max high, 10 usage + +We would end up doing the following calculation below when calculating +high delay for A/B: + + A/B: 10 - 9 = 1... + A: 20 - PAGE_COUNTER_MAX = 21, so set max_overage to 21. + +This gets worse with higher disparities in usage in the parent. + +I have no idea how this disappeared from the final version of the patch, +but it is certainly Not Good(tm). This wasn't obvious in testing because, +for a simple cgroup hierarchy with only one child, the result is usually +roughly the same. It's only in more complex hierarchies that things go +really awry (although still, the effects are limited to a maximum of 2 +seconds in schedule_timeout_killable at a maximum). + +[chris@chrisdown.name: changelog] +Fixes: e26733e0d0ec ("mm, memcg: throttle allocators based on ancestral memory.high") +Signed-off-by: Jakub Kicinski +Signed-off-by: Chris Down +Signed-off-by: Andrew Morton +Acked-by: Michal Hocko +Cc: Johannes Weiner +Cc: [5.4.x] +Link: http://lkml.kernel.org/r/20200331152424.GA1019937@chrisdown.name +Signed-off-by: Linus Torvalds +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memcontrol.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/mm/memcontrol.c ++++ b/mm/memcontrol.c +@@ -2324,6 +2324,9 @@ static unsigned long calculate_high_dela + usage = page_counter_read(&memcg->memory); + high = READ_ONCE(memcg->high); + ++ if (usage <= high) ++ continue; ++ + /* + * Prevent division by 0 in overage calculation by acting as if + * it was a threshold of 1 page diff --git a/queue-5.6/net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch b/queue-5.6/net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch new file mode 100644 index 00000000000..80dd1310495 --- /dev/null +++ b/queue-5.6/net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch @@ -0,0 +1,74 @@ +From 2abb5792387eb188b12051337d5dcd2cba615cb0 Mon Sep 17 00:00:00 2001 +From: Subash Abhinov Kasiviswanathan +Date: Wed, 1 Apr 2020 15:23:55 -0600 +Subject: net: qualcomm: rmnet: Allow configuration updates to existing devices + +From: Subash Abhinov Kasiviswanathan + +commit 2abb5792387eb188b12051337d5dcd2cba615cb0 upstream. + +This allows the changelink operation to succeed if the mux_id was +specified as an argument. Note that the mux_id must match the +existing mux_id of the rmnet device or should be an unused mux_id. + +Fixes: 1dc49e9d164c ("net: rmnet: do not allow to change mux id if mux id is duplicated") +Reported-and-tested-by: Alex Elder +Signed-off-by: Sean Tranchetti +Signed-off-by: Subash Abhinov Kasiviswanathan +Signed-off-by: David S. Miller +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 31 ++++++++++++--------- + 1 file changed, 19 insertions(+), 12 deletions(-) + +--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c ++++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +@@ -279,7 +279,6 @@ static int rmnet_changelink(struct net_d + { + struct rmnet_priv *priv = netdev_priv(dev); + struct net_device *real_dev; +- struct rmnet_endpoint *ep; + struct rmnet_port *port; + u16 mux_id; + +@@ -294,19 +293,27 @@ static int rmnet_changelink(struct net_d + + if (data[IFLA_RMNET_MUX_ID]) { + mux_id = nla_get_u16(data[IFLA_RMNET_MUX_ID]); +- if (rmnet_get_endpoint(port, mux_id)) { +- NL_SET_ERR_MSG_MOD(extack, "MUX ID already exists"); +- return -EINVAL; +- } +- ep = rmnet_get_endpoint(port, priv->mux_id); +- if (!ep) +- return -ENODEV; + +- hlist_del_init_rcu(&ep->hlnode); +- hlist_add_head_rcu(&ep->hlnode, &port->muxed_ep[mux_id]); ++ if (mux_id != priv->mux_id) { ++ struct rmnet_endpoint *ep; ++ ++ ep = rmnet_get_endpoint(port, priv->mux_id); ++ if (!ep) ++ return -ENODEV; ++ ++ if (rmnet_get_endpoint(port, mux_id)) { ++ NL_SET_ERR_MSG_MOD(extack, ++ "MUX ID already exists"); ++ return -EINVAL; ++ } ++ ++ hlist_del_init_rcu(&ep->hlnode); ++ hlist_add_head_rcu(&ep->hlnode, ++ &port->muxed_ep[mux_id]); + +- ep->mux_id = mux_id; +- priv->mux_id = mux_id; ++ ep->mux_id = mux_id; ++ priv->mux_id = mux_id; ++ } + } + + if (data[IFLA_RMNET_FLAGS]) { diff --git a/queue-5.6/sched-core-remove-duplicate-assignment-in-sched_tick_remote.patch b/queue-5.6/sched-core-remove-duplicate-assignment-in-sched_tick_remote.patch new file mode 100644 index 00000000000..9f9f0cfb1e4 --- /dev/null +++ b/queue-5.6/sched-core-remove-duplicate-assignment-in-sched_tick_remote.patch @@ -0,0 +1,34 @@ +From 82e0516ce3a147365a5dd2a9bedd5ba43a18663d Mon Sep 17 00:00:00 2001 +From: Scott Wood +Date: Mon, 3 Feb 2020 19:35:58 -0500 +Subject: sched/core: Remove duplicate assignment in sched_tick_remote() + +From: Scott Wood + +commit 82e0516ce3a147365a5dd2a9bedd5ba43a18663d upstream. + +A redundant "curr = rq->curr" was added; remove it. + +Fixes: ebc0f83c78a2 ("timers/nohz: Update NOHZ load in remote tick") +Signed-off-by: Scott Wood +Signed-off-by: Peter Zijlstra (Intel) +Signed-off-by: Ingo Molnar +Signed-off-by: Thomas Gleixner +Link: https://lkml.kernel.org/r/1580776558-12882-1-git-send-email-swood@redhat.com +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched/core.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -3671,7 +3671,6 @@ static void sched_tick_remote(struct wor + if (cpu_is_offline(cpu)) + goto out_unlock; + +- curr = rq->curr; + update_rq_clock(rq); + + if (!is_idle_task(curr)) { diff --git a/queue-5.6/scsi-mpt3sas-fix-kernel-panic-observed-on-soft-hba-unplug.patch b/queue-5.6/scsi-mpt3sas-fix-kernel-panic-observed-on-soft-hba-unplug.patch new file mode 100644 index 00000000000..0639b5bb591 --- /dev/null +++ b/queue-5.6/scsi-mpt3sas-fix-kernel-panic-observed-on-soft-hba-unplug.patch @@ -0,0 +1,77 @@ +From cc41f11a21a51d6869d71e525a7264c748d7c0d7 Mon Sep 17 00:00:00 2001 +From: Sreekanth Reddy +Date: Fri, 27 Mar 2020 05:52:43 -0400 +Subject: scsi: mpt3sas: Fix kernel panic observed on soft HBA unplug + +From: Sreekanth Reddy + +commit cc41f11a21a51d6869d71e525a7264c748d7c0d7 upstream. + +Generic protection fault type kernel panic is observed when user performs +soft (ordered) HBA unplug operation while IOs are running on drives +connected to HBA. + +When user performs ordered HBA removal operation, the kernel calls PCI +device's .remove() call back function where driver is flushing out all the +outstanding SCSI IO commands with DID_NO_CONNECT host byte and also unmaps +sg buffers allocated for these IO commands. + +However, in the ordered HBA removal case (unlike of real HBA hot removal), +HBA device is still alive and hence HBA hardware is performing the DMA +operations to those buffers on the system memory which are already unmapped +while flushing out the outstanding SCSI IO commands and this leads to +kernel panic. + +Don't flush out the outstanding IOs from .remove() path in case of ordered +removal since HBA will be still alive in this case and it can complete the +outstanding IOs. Flush out the outstanding IOs only in case of 'physical +HBA hot unplug' where there won't be any communication with the HBA. + +During shutdown also it is possible that HBA hardware can perform DMA +operations on those outstanding IO buffers which are completed with +DID_NO_CONNECT by the driver from .shutdown(). So same above fix is applied +in shutdown path as well. + +It is safe to drop the outstanding commands when HBA is inaccessible such +as when permanent PCI failure happens, when HBA is in non-operational +state, or when someone does a real HBA hot unplug operation. Since driver +knows that HBA is inaccessible during these cases, it is safe to drop the +outstanding commands instead of waiting for SCSI error recovery to kick in +and clear these outstanding commands. + +Link: https://lore.kernel.org/r/1585302763-23007-1-git-send-email-sreekanth.reddy@broadcom.com +Fixes: c666d3be99c0 ("scsi: mpt3sas: wait for and flush running commands on shutdown/unload") +Cc: stable@vger.kernel.org #v4.14.174+ +Signed-off-by: Sreekanth Reddy +Signed-off-by: Martin K. Petersen +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c ++++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c +@@ -9908,8 +9908,8 @@ static void scsih_remove(struct pci_dev + + ioc->remove_host = 1; + +- mpt3sas_wait_for_commands_to_complete(ioc); +- _scsih_flush_running_cmds(ioc); ++ if (!pci_device_is_present(pdev)) ++ _scsih_flush_running_cmds(ioc); + + _scsih_fw_event_cleanup_queue(ioc); + +@@ -9992,8 +9992,8 @@ scsih_shutdown(struct pci_dev *pdev) + + ioc->remove_host = 1; + +- mpt3sas_wait_for_commands_to_complete(ioc); +- _scsih_flush_running_cmds(ioc); ++ if (!pci_device_is_present(pdev)) ++ _scsih_flush_running_cmds(ioc); + + _scsih_fw_event_cleanup_queue(ioc); + diff --git a/queue-5.6/series b/queue-5.6/series index b029da37419..5e96687522d 100644 --- a/queue-5.6/series +++ b/queue-5.6/series @@ -164,3 +164,10 @@ time-namespace-add-max_time_namespaces-ucount.patch crypto-rng-fix-a-refcounting-bug-in-crypto_rng_reset.patch crypto-mxs-dcp-fix-scatterlist-linearization-for-hash.patch io_uring-honor-original-task-rlimit_fsize.patch +scsi-mpt3sas-fix-kernel-panic-observed-on-soft-hba-unplug.patch +tools-gpio-fix-out-of-tree-build-regression.patch +net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch +arm64-dts-allwinner-h6-fix-pmu-compatible.patch +sched-core-remove-duplicate-assignment-in-sched_tick_remote.patch +arm64-dts-allwinner-h5-fix-pmu-compatible.patch +mm-memcg-do-not-high-throttle-allocators-based-on-wraparound.patch diff --git a/queue-5.6/tools-gpio-fix-out-of-tree-build-regression.patch b/queue-5.6/tools-gpio-fix-out-of-tree-build-regression.patch new file mode 100644 index 00000000000..d1357aec44c --- /dev/null +++ b/queue-5.6/tools-gpio-fix-out-of-tree-build-regression.patch @@ -0,0 +1,42 @@ +From 82f04bfe2aff428b063eefd234679b2d693228ed Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Wed, 25 Mar 2020 12:31:54 +0200 +Subject: tools: gpio: Fix out-of-tree build regression + +From: Anssi Hannula + +commit 82f04bfe2aff428b063eefd234679b2d693228ed upstream. + +Commit 0161a94e2d1c7 ("tools: gpio: Correctly add make dependencies for +gpio_utils") added a make rule for gpio-utils-in.o but used $(output) +instead of the correct $(OUTPUT) for the output directory, breaking +out-of-tree build (O=xx) with the following error: + + No rule to make target 'out/tools/gpio/gpio-utils-in.o', needed by 'out/tools/gpio/lsgpio-in.o'. Stop. + +Fix that. + +Fixes: 0161a94e2d1c ("tools: gpio: Correctly add make dependencies for gpio_utils") +Cc: +Cc: Laura Abbott +Signed-off-by: Anssi Hannula +Link: https://lore.kernel.org/r/20200325103154.32235-1-anssi.hannula@bitwise.fi +Reviewed-by: Bartosz Golaszewski +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman + +--- + tools/gpio/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/gpio/Makefile ++++ b/tools/gpio/Makefile +@@ -35,7 +35,7 @@ $(OUTPUT)include/linux/gpio.h: ../../inc + + prepare: $(OUTPUT)include/linux/gpio.h + +-GPIO_UTILS_IN := $(output)gpio-utils-in.o ++GPIO_UTILS_IN := $(OUTPUT)gpio-utils-in.o + $(GPIO_UTILS_IN): prepare FORCE + $(Q)$(MAKE) $(build)=gpio-utils +