]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.10
authorSasha Levin <sashal@kernel.org>
Mon, 19 Sep 2022 12:26:44 +0000 (08:26 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 19 Sep 2022 12:26:44 +0000 (08:26 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.10/series
queue-5.10/tracing-hold-caller_addr-to-hardirq_-enable-disable-.patch [new file with mode: 0644]

index 73ae784aa7d9028cf7ce35073d8166f30ac7182d..ee5df3b2d9afa7b3274efda4f57430419b6b1ead 100644 (file)
@@ -39,3 +39,4 @@ gpio-mpc8xxx-fix-support-for-irq_type_level_low-flow.patch
 drm-meson-correct-osd1-global-alpha-value.patch
 drm-meson-fix-osd1-rgb-to-ycbcr-coefficient.patch
 parisc-ccio-dma-add-missing-iounmap-in-error-path-in.patch
+tracing-hold-caller_addr-to-hardirq_-enable-disable-.patch
diff --git a/queue-5.10/tracing-hold-caller_addr-to-hardirq_-enable-disable-.patch b/queue-5.10/tracing-hold-caller_addr-to-hardirq_-enable-disable-.patch
new file mode 100644 (file)
index 0000000..b2b751b
--- /dev/null
@@ -0,0 +1,60 @@
+From e13a74b34317a6572324b769aad4c5e657504a89 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 1 Sep 2022 18:45:14 +0800
+Subject: tracing: hold caller_addr to hardirq_{enable,disable}_ip
+
+From: Yipeng Zou <zouyipeng@huawei.com>
+
+[ Upstream commit 54c3931957f6a6194d5972eccc36d052964b2abe ]
+
+Currently, The arguments passing to lockdep_hardirqs_{on,off} was fixed
+in CALLER_ADDR0.
+The function trace_hardirqs_on_caller should have been intended to use
+caller_addr to represent the address that caller wants to be traced.
+
+For example, lockdep log in riscv showing the last {enabled,disabled} at
+__trace_hardirqs_{on,off} all the time(if called by):
+[   57.853175] hardirqs last  enabled at (2519): __trace_hardirqs_on+0xc/0x14
+[   57.853848] hardirqs last disabled at (2520): __trace_hardirqs_off+0xc/0x14
+
+After use trace_hardirqs_xx_caller, we can get more effective information:
+[   53.781428] hardirqs last  enabled at (2595): restore_all+0xe/0x66
+[   53.782185] hardirqs last disabled at (2596): ret_from_exception+0xa/0x10
+
+Link: https://lkml.kernel.org/r/20220901104515.135162-2-zouyipeng@huawei.com
+
+Cc: stable@vger.kernel.org
+Fixes: c3bc8fd637a96 ("tracing: Centralize preemptirq tracepoints and unify their usage")
+Signed-off-by: Yipeng Zou <zouyipeng@huawei.com>
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/trace/trace_preemptirq.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
+index f4938040c228..3aa55b807560 100644
+--- a/kernel/trace/trace_preemptirq.c
++++ b/kernel/trace/trace_preemptirq.c
+@@ -94,15 +94,15 @@ __visible void trace_hardirqs_on_caller(unsigned long caller_addr)
+               this_cpu_write(tracing_irq_cpu, 0);
+       }
+-      lockdep_hardirqs_on_prepare(CALLER_ADDR0);
+-      lockdep_hardirqs_on(CALLER_ADDR0);
++      lockdep_hardirqs_on_prepare(caller_addr);
++      lockdep_hardirqs_on(caller_addr);
+ }
+ EXPORT_SYMBOL(trace_hardirqs_on_caller);
+ NOKPROBE_SYMBOL(trace_hardirqs_on_caller);
+ __visible void trace_hardirqs_off_caller(unsigned long caller_addr)
+ {
+-      lockdep_hardirqs_off(CALLER_ADDR0);
++      lockdep_hardirqs_off(caller_addr);
+       if (!this_cpu_read(tracing_irq_cpu)) {
+               this_cpu_write(tracing_irq_cpu, 1);
+-- 
+2.35.1
+