--- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -542,7 +542,7 @@ static __always_inline int trace_test_an current->trace_recursion = val; barrier(); - return bit; + return bit + 1; } static __always_inline void trace_clear_recursion(int bit) @@ -552,6 +552,7 @@ static __always_inline void trace_clear_ if (!bit) return; + bit--; bit = 1 << bit; val &= ~bit;