lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Aug 2020 19:28:03 +0800
From:   Xianting Tian <tian.xianting@....com>
To:     <rostedt@...dmis.org>, <mingo@...hat.com>
CC:     <linux-kernel@...r.kernel.org>,
        Xianting Tian <tian.xianting@....com>
Subject: [PATCH] tracing: use __this_cpu_read() in trace_buffered_event_enable()

The code is executed with preemption disabled, so it's
safe to use __this_cpu_read().

Signed-off-by: Xianting Tian <tian.xianting@....com>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index bb6226972..7d0d71ce9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2514,7 +2514,7 @@ void trace_buffered_event_enable(void)
 
 		preempt_disable();
 		if (cpu == smp_processor_id() &&
-		    this_cpu_read(trace_buffered_event) !=
+		    __this_cpu_read(trace_buffered_event) !=
 		    per_cpu(trace_buffered_event, cpu))
 			WARN_ON_ONCE(1);
 		preempt_enable();
-- 
2.17.1

Powered by blists - more mailing lists