diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-02-12 21:01:16 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-05-19 15:51:18 +0200 |
commit | f93524eb9c54f49be150167918f6546b0a2e09b1 (patch) | |
tree | 2c480d01f1f014baf454abb8ce8f52adac0ad6d4 /drivers/fpga/xilinx-spi.c | |
parent | 178ba00c354eb15cec6806a812771e60a5ae3ea1 (diff) |
sched,rcu,tracing: Avoid tracing before in_nmi() is correct
If a tracer is invoked before in_nmi() becomes true, the tracer can no
longer detect it is called from NMI context and behave correctly.
Therefore change nmi_{enter,exit}() to use __preempt_count_{add,sub}()
as the normal preempt_count_{add,sub}() have a (desired) function
trace entry.
This fixes a potential issue with the current code; when the function-tracer
has stack-tracing enabled __trace_stack() will malfunction when it hits the
preempt_count_add() function entry from NMI context.
Suggested-by: Steven Rostedt (VMware) <rosted@goodmis.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Link: https://lkml.kernel.org/r/20200505134101.434193525@linutronix.de
Diffstat (limited to 'drivers/fpga/xilinx-spi.c')
0 files changed, 0 insertions, 0 deletions