]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ring-buffer: Fix duplicate results in mapping context to bits in recursive lock
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 18 Jan 2018 20:42:09 +0000 (15:42 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 18 Jan 2018 20:45:48 +0000 (15:45 -0500)
commit0164e0d7e803af3ee1c63770978c728f8778ad01
tree0bcf3a618d4d36a1efc6458456f579783b17d19e
parent68e76e034b6b1c1ce2eece1ab8ae4008e14be470
ring-buffer: Fix duplicate results in mapping context to bits in recursive lock

In bringing back the context checks, the code checks first if its normal
(non-interrupt) context, and then for NMI then IRQ then softirq. The final
check is redundant. Since the if branch is only hit if the context is one of
NMI, IRQ, or SOFTIRQ, if it's not NMI or IRQ there's no reason to check if
it is SOFTIRQ. The current code returns the same result even if its not a
SOFTIRQ. Which is confusing.

  pc & SOFTIRQ_OFFSET ? 2 : RB_CTX_SOFTIRQ

Is redundant as RB_CTX_SOFTIRQ *is* 2!

Fixes: a0e3a18f4baf ("ring-buffer: Bring back context level recursive checks")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c