mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-03 21:19:09 +08:00
perf: Fix get_recursion_context()
One should use in_serving_softirq() to detect SoftIRQ context.
Fixes: 96f6d44443 ("perf_counter: avoid recursion")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20201030151955.120572175@infradead.org
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user