From: Greg Kroah-Hartman Date: Tue, 18 Apr 2023 10:16:37 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v4.14.313~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ca9df516560171b919ae86607377b38075c7c50;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: cgroup-cpuset-wake-up-cpuset_attach_wq-tasks-in-cpuset_cancel_attach.patch coresight-etm4-fix-for-loop-drvdata-nr_addr_cmp-range-bug.patch watchdog-sbsa_wdog-make-sure-the-timeout-programming-is-within-the-limits.patch --- diff --git a/queue-4.14/cgroup-cpuset-wake-up-cpuset_attach_wq-tasks-in-cpuset_cancel_attach.patch b/queue-4.14/cgroup-cpuset-wake-up-cpuset_attach_wq-tasks-in-cpuset_cancel_attach.patch new file mode 100644 index 00000000000..e585bf10e2c --- /dev/null +++ b/queue-4.14/cgroup-cpuset-wake-up-cpuset_attach_wq-tasks-in-cpuset_cancel_attach.patch @@ -0,0 +1,43 @@ +From ba9182a89626d5f83c2ee4594f55cb9c1e60f0e2 Mon Sep 17 00:00:00 2001 +From: Waiman Long +Date: Tue, 11 Apr 2023 09:35:57 -0400 +Subject: cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Waiman Long + +commit ba9182a89626d5f83c2ee4594f55cb9c1e60f0e2 upstream. + +After a successful cpuset_can_attach() call which increments the +attach_in_progress flag, either cpuset_cancel_attach() or cpuset_attach() +will be called later. In cpuset_attach(), tasks in cpuset_attach_wq, +if present, will be woken up at the end. That is not the case in +cpuset_cancel_attach(). So missed wakeup is possible if the attach +operation is somehow cancelled. Fix that by doing the wakeup in +cpuset_cancel_attach() as well. + +Fixes: e44193d39e8d ("cpuset: let hotplug propagation work wait for task attaching") +Signed-off-by: Waiman Long +Reviewed-by: Michal Koutný +Cc: stable@vger.kernel.org # v3.11+ +Signed-off-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman +--- + kernel/cgroup/cpuset.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/kernel/cgroup/cpuset.c ++++ b/kernel/cgroup/cpuset.c +@@ -1508,7 +1508,9 @@ static void cpuset_cancel_attach(struct + cs = css_cs(css); + + mutex_lock(&cpuset_mutex); +- css_cs(css)->attach_in_progress--; ++ cs->attach_in_progress--; ++ if (!cs->attach_in_progress) ++ wake_up(&cpuset_attach_wq); + mutex_unlock(&cpuset_mutex); + } + diff --git a/queue-4.14/coresight-etm4-fix-for-loop-drvdata-nr_addr_cmp-range-bug.patch b/queue-4.14/coresight-etm4-fix-for-loop-drvdata-nr_addr_cmp-range-bug.patch new file mode 100644 index 00000000000..6f038f37b7a --- /dev/null +++ b/queue-4.14/coresight-etm4-fix-for-loop-drvdata-nr_addr_cmp-range-bug.patch @@ -0,0 +1,33 @@ +From bf84937e882009075f57fd213836256fc65d96bc Mon Sep 17 00:00:00 2001 +From: Steve Clevenger +Date: Mon, 27 Feb 2023 16:54:32 -0700 +Subject: coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug + +From: Steve Clevenger + +commit bf84937e882009075f57fd213836256fc65d96bc upstream. + +In etm4_enable_hw, fix for() loop range to represent address comparator pairs. + +Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver") +Cc: stable@vger.kernel.org +Signed-off-by: Steve Clevenger +Reviewed-by: James Clark +Signed-off-by: Suzuki K Poulose +Link: https://lore.kernel.org/r/4a4ee61ce8ef402615a4528b21a051de3444fb7b.1677540079.git.scclevenger@os.amperecomputing.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hwtracing/coresight/coresight-etm4x.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/hwtracing/coresight/coresight-etm4x.c ++++ b/drivers/hwtracing/coresight/coresight-etm4x.c +@@ -150,7 +150,7 @@ static void etm4_enable_hw(void *info) + writel_relaxed(config->ss_pe_cmp[i], + drvdata->base + TRCSSPCICRn(i)); + } +- for (i = 0; i < drvdata->nr_addr_cmp; i++) { ++ for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) { + writeq_relaxed(config->addr_val[i], + drvdata->base + TRCACVRn(i)); + writeq_relaxed(config->addr_acc[i], diff --git a/queue-4.14/series b/queue-4.14/series index 667beb21c3e..82756578359 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -29,3 +29,6 @@ i2c-imx-lpi2c-clean-rx-tx-buffers-upon-new-message.patch efi-sysfb_efi-add-quirk-for-lenovo-yoga-book-x91f-l.patch verify_pefile-relax-wrapper-length-check.patch ubi-fix-failure-attaching-when-vid_hdr-offset-equals-to-sub-page-size.patch +cgroup-cpuset-wake-up-cpuset_attach_wq-tasks-in-cpuset_cancel_attach.patch +watchdog-sbsa_wdog-make-sure-the-timeout-programming-is-within-the-limits.patch +coresight-etm4-fix-for-loop-drvdata-nr_addr_cmp-range-bug.patch diff --git a/queue-4.14/watchdog-sbsa_wdog-make-sure-the-timeout-programming-is-within-the-limits.patch b/queue-4.14/watchdog-sbsa_wdog-make-sure-the-timeout-programming-is-within-the-limits.patch new file mode 100644 index 00000000000..f70bed4eb49 --- /dev/null +++ b/queue-4.14/watchdog-sbsa_wdog-make-sure-the-timeout-programming-is-within-the-limits.patch @@ -0,0 +1,36 @@ +From 000987a38b53c172f435142a4026dd71378ca464 Mon Sep 17 00:00:00 2001 +From: George Cherian +Date: Thu, 9 Feb 2023 02:11:17 +0000 +Subject: watchdog: sbsa_wdog: Make sure the timeout programming is within the limits + +From: George Cherian + +commit 000987a38b53c172f435142a4026dd71378ca464 upstream. + +Make sure to honour the max_hw_heartbeat_ms while programming the timeout +value to WOR. Clamp the timeout passed to sbsa_gwdt_set_timeout() to +make sure the programmed value is within the permissible range. + +Fixes: abd3ac7902fb ("watchdog: sbsa: Support architecture version 1") + +Signed-off-by: George Cherian +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20230209021117.1512097-1-george.cherian@marvell.com +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Tyler Hicks (Microsoft) +Signed-off-by: Greg Kroah-Hartman +--- + drivers/watchdog/sbsa_gwdt.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/watchdog/sbsa_gwdt.c ++++ b/drivers/watchdog/sbsa_gwdt.c +@@ -130,6 +130,7 @@ static int sbsa_gwdt_set_timeout(struct + struct sbsa_gwdt *gwdt = watchdog_get_drvdata(wdd); + + wdd->timeout = timeout; ++ timeout = clamp_t(unsigned int, timeout, 1, wdd->max_hw_heartbeat_ms / 1000); + + if (action) + writel(gwdt->clk * timeout,