summaryrefslogtreecommitdiff
path: root/kernel/events
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-10-30 12:49:45 +0100
committerPeter Zijlstra <peterz@infradead.org>2020-11-09 18:12:34 +0100
commitce0f17fc93f63ee91428af10b7b2ddef38cd19e5 (patch)
tree81c9de4cdf751c18b7c0eb9c7229116f49811cbf /kernel/events
parent9dfa9a5c9bae3417b87824e7ac73b00c10b6a874 (diff)
perf: Fix get_recursion_context()
One should use in_serving_softirq() to detect SoftIRQ context. Fixes: 96f6d4444302 ("perf_counter: avoid recursion") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20201030151955.120572175@infradead.org
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/events/internal.h b/kernel/events/internal.h
index fcbf5616a441..402054e755f2 100644
--- a/kernel/events/internal.h
+++ b/kernel/events/internal.h
@@ -211,7 +211,7 @@ static inline int get_recursion_context(int *recursion)
rctx = 3;
else if (in_irq())
rctx = 2;
- else if (in_softirq())
+ else if (in_serving_softirq())
rctx = 1;
else
rctx = 0;