Skip to content

Commit ce0f17f

Browse files
author
Peter Zijlstra
committed
perf: Fix get_recursion_context()
One should use in_serving_softirq() to detect SoftIRQ context. Fixes: 96f6d44 ("perf_counter: avoid recursion") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20201030151955.120572175@infradead.org
1 parent 9dfa9a5 commit ce0f17f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/events/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static inline int get_recursion_context(int *recursion)
211211
rctx = 3;
212212
else if (in_irq())
213213
rctx = 2;
214-
else if (in_softirq())
214+
else if (in_serving_softirq())
215215
rctx = 1;
216216
else
217217
rctx = 0;

0 commit comments

Comments
 (0)