aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_selftest.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2020-10-29 17:31:45 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-11-02 08:52:18 -0500
commitee11b93f95eabdf8198edd4668bf9102e7248270 (patch)
tree67c54a9830e23b2325b2a0020ee12f9e2c339afb /kernel/trace/trace_selftest.c
parenttracing: Fix out of bounds write in get_trace_buf (diff)
downloadlinux-dev-ee11b93f95eabdf8198edd4668bf9102e7248270.tar.xz
linux-dev-ee11b93f95eabdf8198edd4668bf9102e7248270.zip
ftrace: Fix recursion check for NMI test
The code that checks recursion will work to only do the recursion check once if there's nested checks. The top one will do the check, the other nested checks will see recursion was already checked and return zero for its "bit". On the return side, nothing will be done if the "bit" is zero. The problem is that zero is returned for the "good" bit when in NMI context. This will set the bit for NMIs making it look like *all* NMI tracing is recursing, and prevent tracing of anything in NMI context! The simple fix is to return "bit + 1" and subtract that bit on the end to get the real bit. Cc: stable@vger.kernel.org Fixes: edc15cafcbfa3 ("tracing: Avoid unnecessary multiple recursion checks") Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_selftest.c')
0 files changed, 0 insertions, 0 deletions