From: Greg Kroah-Hartman Date: Sun, 4 Oct 2020 10:59:14 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.19.150~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9d388c311b95cce0b20de577fd3581cd7ad6bb2;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: drm-amdgpu-restore-proper-ref-count-in-amdgpu_display_crtc_set_config.patch ftrace-move-rcu-is-watching-check-after-recursion-check.patch i2c-i801-exclude-device-from-suspend-direct-complete-optimization.patch input-i8042-add-nopnp-quirk-for-acer-aspire-5-a515.patch --- diff --git a/queue-4.19/drm-amdgpu-restore-proper-ref-count-in-amdgpu_display_crtc_set_config.patch b/queue-4.19/drm-amdgpu-restore-proper-ref-count-in-amdgpu_display_crtc_set_config.patch new file mode 100644 index 00000000000..bd39290eb12 --- /dev/null +++ b/queue-4.19/drm-amdgpu-restore-proper-ref-count-in-amdgpu_display_crtc_set_config.patch @@ -0,0 +1,43 @@ +From a39d0d7bdf8c21ac7645c02e9676b5cb2b804c31 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Mon, 28 Sep 2020 11:10:37 +0200 +Subject: drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config + +From: Jean Delvare + +commit a39d0d7bdf8c21ac7645c02e9676b5cb2b804c31 upstream. + +A recent attempt to fix a ref count leak in +amdgpu_display_crtc_set_config() turned out to be doing too much and +"fixed" an intended decrease as if it were a leak. Undo that part to +restore the proper balance. This is the very nature of this function +to increase or decrease the power reference count depending on the +situation. + +Consequences of this bug is that the power reference would +eventually get down to 0 while the display was still in use, +resulting in that display switching off unexpectedly. + +Signed-off-by: Jean Delvare +Fixes: e008fa6fb415 ("drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config") +Cc: stable@vger.kernel.org +Cc: Navid Emamdoost +Cc: Alex Deucher +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +@@ -290,7 +290,7 @@ int amdgpu_display_crtc_set_config(struc + take the current one */ + if (active && !adev->have_disp_power_ref) { + adev->have_disp_power_ref = true; +- goto out; ++ return ret; + } + /* if we have no active crtcs, then drop the power ref + we got before */ diff --git a/queue-4.19/ftrace-move-rcu-is-watching-check-after-recursion-check.patch b/queue-4.19/ftrace-move-rcu-is-watching-check-after-recursion-check.patch new file mode 100644 index 00000000000..0ce8b8eb680 --- /dev/null +++ b/queue-4.19/ftrace-move-rcu-is-watching-check-after-recursion-check.patch @@ -0,0 +1,55 @@ +From b40341fad6cc2daa195f8090fd3348f18fff640a Mon Sep 17 00:00:00 2001 +From: "Steven Rostedt (VMware)" +Date: Tue, 29 Sep 2020 12:40:31 -0400 +Subject: ftrace: Move RCU is watching check after recursion check + +From: Steven Rostedt (VMware) + +commit b40341fad6cc2daa195f8090fd3348f18fff640a upstream. + +The first thing that the ftrace function callback helper functions should do +is to check for recursion. Peter Zijlstra found that when +"rcu_is_watching()" had its notrace removed, it caused perf function tracing +to crash. This is because the call of rcu_is_watching() is tested before +function recursion is checked and and if it is traced, it will cause an +infinite recursion loop. + +rcu_is_watching() should still stay notrace, but to prevent this should +never had crashed in the first place. The recursion prevention must be the +first thing done in callback functions. + +Link: https://lore.kernel.org/r/20200929112541.GM2628@hirez.programming.kicks-ass.net + +Cc: stable@vger.kernel.org +Cc: Paul McKenney +Fixes: c68c0fa293417 ("ftrace: Have ftrace_ops_get_func() handle RCU and PER_CPU flags too") +Acked-by: Peter Zijlstra (Intel) +Reported-by: Peter Zijlstra (Intel) +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/ftrace.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/kernel/trace/ftrace.c ++++ b/kernel/trace/ftrace.c +@@ -6370,16 +6370,14 @@ static void ftrace_ops_assist_func(unsig + { + int bit; + +- if ((op->flags & FTRACE_OPS_FL_RCU) && !rcu_is_watching()) +- return; +- + bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX); + if (bit < 0) + return; + + preempt_disable_notrace(); + +- op->func(ip, parent_ip, op, regs); ++ if (!(op->flags & FTRACE_OPS_FL_RCU) || rcu_is_watching()) ++ op->func(ip, parent_ip, op, regs); + + preempt_enable_notrace(); + trace_clear_recursion(bit); diff --git a/queue-4.19/i2c-i801-exclude-device-from-suspend-direct-complete-optimization.patch b/queue-4.19/i2c-i801-exclude-device-from-suspend-direct-complete-optimization.patch new file mode 100644 index 00000000000..bc004ca6f37 --- /dev/null +++ b/queue-4.19/i2c-i801-exclude-device-from-suspend-direct-complete-optimization.patch @@ -0,0 +1,39 @@ +From 845b89127bc5458d0152a4d63f165c62a22fcb70 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Thu, 10 Sep 2020 11:57:08 +0200 +Subject: i2c: i801: Exclude device from suspend direct complete optimization +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jean Delvare + +commit 845b89127bc5458d0152a4d63f165c62a22fcb70 upstream. + +By default, PCI drivers with runtime PM enabled will skip the calls +to suspend and resume on system PM. For this driver, we don't want +that, as we need to perform additional steps for system PM to work +properly on all systems. So instruct the PM core to not skip these +calls. + +Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") +Reported-by: Volker Rümelin +Signed-off-by: Jean Delvare +Cc: stable@vger.kernel.org +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/i2c/busses/i2c-i801.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/i2c/busses/i2c-i801.c ++++ b/drivers/i2c/busses/i2c-i801.c +@@ -1698,6 +1698,7 @@ static int i801_probe(struct pci_dev *de + + pci_set_drvdata(dev, priv); + ++ dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE); + pm_runtime_set_autosuspend_delay(&dev->dev, 1000); + pm_runtime_use_autosuspend(&dev->dev); + pm_runtime_put_autosuspend(&dev->dev); diff --git a/queue-4.19/input-i8042-add-nopnp-quirk-for-acer-aspire-5-a515.patch b/queue-4.19/input-i8042-add-nopnp-quirk-for-acer-aspire-5-a515.patch new file mode 100644 index 00000000000..f03498d448e --- /dev/null +++ b/queue-4.19/input-i8042-add-nopnp-quirk-for-acer-aspire-5-a515.patch @@ -0,0 +1,45 @@ +From 5fc27b098dafb8e30794a9db0705074c7d766179 Mon Sep 17 00:00:00 2001 +From: Jiri Kosina +Date: Mon, 28 Sep 2020 16:21:17 -0700 +Subject: Input: i8042 - add nopnp quirk for Acer Aspire 5 A515 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jiri Kosina + +commit 5fc27b098dafb8e30794a9db0705074c7d766179 upstream. + +Touchpad on this laptop is not detected properly during boot, as PNP +enumerates (wrongly) AUX port as disabled on this machine. + +Fix that by adding this board (with admittedly quite funny DMI +identifiers) to nopnp quirk list. + +Reported-by: Andrés Barrantes Silman +Signed-off-by: Jiri Kosina +Link: https://lore.kernel.org/r/nycvar.YFH.7.76.2009252337340.3336@cbobk.fhfr.pm +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -725,6 +725,13 @@ static const struct dmi_system_id __init + DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), + }, + }, ++ { ++ /* Acer Aspire 5 A515 */ ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "Grumpy_PK"), ++ DMI_MATCH(DMI_BOARD_VENDOR, "PK"), ++ }, ++ }, + { } + }; + diff --git a/queue-4.19/series b/queue-4.19/series index 7a4512c07ed..61f894d3c84 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -7,3 +7,7 @@ vsock-virtio-use-rcu-to-avoid-use-after-free-on-the_.patch vsock-virtio-stop-workers-during-the-.remove.patch vsock-virtio-add-transport-parameter-to-the-virtio_t.patch net-virtio_vsock-enhance-connection-semantics.patch +i2c-i801-exclude-device-from-suspend-direct-complete-optimization.patch +input-i8042-add-nopnp-quirk-for-acer-aspire-5-a515.patch +ftrace-move-rcu-is-watching-check-after-recursion-check.patch +drm-amdgpu-restore-proper-ref-count-in-amdgpu_display_crtc_set_config.patch