• Thomas Gleixner's avatar
    trace: fix task state printout · 3d9101e9
    Thomas Gleixner authored
    Impact: fix occasionally incorrect trace output
    
    The tracing code has interesting varieties of printing out task state.
    
    Unfortunalely only one of the instances is correct as it copies the
    code from sched.c:sched_show_task(). The others are plain wrong as
    they treatthe bitfield as an integer offset into the character
    array. Also the size check of the character array is wrong as it
    includes the trailing \0.
    
    Use a common state decoder inline which does the Right Thing.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    3d9101e9
trace.c 71.5 KB