1
0
Fork 0
alistair23-linux/include/trace
Pavankumar Kondeti 3054426dc6 sched, trace: Fix prev_state output in sched_switch tracepoint
commit 3f5fe9fef5 ("sched/debug: Fix task state recording/printout")
tried to fix the problem introduced by a previous commit efb40f588b
("sched/tracing: Fix trace_sched_switch task-state printing"). However
the prev_state output in sched_switch is still broken.

task_state_index() uses fls() which considers the LSB as 1. Left
shifting 1 by this value gives an incorrect mapping to the task state.
Fix this by decrementing the value returned by __get_task_state()
before shifting.

Link: http://lkml.kernel.org/r/1540882473-1103-1-git-send-email-pkondeti@codeaurora.org

Cc: stable@vger.kernel.org
Fixes: 3f5fe9fef5 ("sched/debug: Fix task state recording/printout")
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-11-27 20:31:55 -05:00
..
events sched, trace: Fix prev_state output in sched_switch tracepoint 2018-11-27 20:31:55 -05:00
bpf_probe.h bpf: introduce BPF_RAW_TRACEPOINT 2018-03-28 22:55:19 +02:00
define_trace.h bpf: introduce BPF_RAW_TRACEPOINT 2018-03-28 22:55:19 +02:00
perf.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
syscall.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_events.h tracing: Prevent further users of zero size static arrays in trace events 2018-05-29 08:29:13 -04:00