]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: warn if recursing into the hcall tracing code
authorNicholas Piggin <npiggin@gmail.com>
Sat, 8 May 2021 10:14:55 +0000 (20:14 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 12 May 2021 01:07:39 +0000 (11:07 +1000)
commit73665348a04872b3603270045561660849f58b3a
treef7c45960255bb6d474ffa8559a24543755d0a098
parenta5bccda95d4849ed7df4a7fe253af23c9aaa4c97
powerpc/pseries: warn if recursing into the hcall tracing code

The hcall tracing code has a recursion check built in, which skips
tracing if we are already tracing an hcall.

However if the tracing code has problems with recursion, this check
may not catch all cases because the tracing code could be invoked from
a different tracepoint first, then make an hcall that gets traced,
then recurse.

Add an explicit warning if recursion is detected here, which might help
to notice tracing code making hcalls. Really the core trace code should
have its own recursion checking and warnings though.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210508101455.1578318-5-npiggin@gmail.com
arch/powerpc/platforms/pseries/lpar.c