]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
perf: Fix get_recursion_context()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 30 Oct 2020 11:49:45 +0000 (12:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:18:48 +0000 (19:18 +0100)
[ Upstream commit ce0f17fc93f63ee91428af10b7b2ddef38cd19e5 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/events/internal.h

index 6dc725a7e7bc91a866a85b7ac4045d92a610ecaa..8fc0ddc38cb69edde47332b9afdefc2ba4e4cf23 100644 (file)
@@ -209,7 +209,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;