lkml.org 
[lkml]   [2009]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[Patch 2/2] ksym_tracer:Handle machine stall when cat trace_pipe for ksym tracer
    'trace_pipe' does not handle a TRACE_TYPE_PARTIAL_LINE well and causes the
    machine to stall. While a TRACE_TYPE_UNHANDLED return causes the tracer to
    output unrelated data, a TRACE_TYPE_HANDLED return presents a clean output
    (minus all partial traces).

    Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>
    ---
    kernel/trace/trace_ksym.c | 6 ++++++
    1 file changed, 6 insertions(+)

    Index: linux-2.6-tip.hbkpt/kernel/trace/trace_ksym.c
    ===================================================================
    --- linux-2.6-tip.hbkpt.orig/kernel/trace/trace_ksym.c
    +++ linux-2.6-tip.hbkpt/kernel/trace/trace_ksym.c
    @@ -389,6 +389,12 @@ static enum print_line_t ksym_trace_outp

    trace_assign_type(field, entry);

    + /*
    + * Return early without any output if we don't have sufficient
    + * information
    + */
    + if ((!field->ksym_hbp->info.type) || (!field->ip))
    + return TRACE_TYPE_HANDLED;
    ret = trace_seq_printf(s, "%-15s %-5d %-3d %-20s ", field->p_name,
    entry->pid, iter->cpu, field->ksym_name);
    if (!ret) {


    \
     
     \ /
      Last update: 2009-06-17 01:09    [W:0.026 / U:0.744 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site