Removal of a ksym entry results in missing information and an early return with TRACE_TYPE_PARTIAL_LINE code (minus the line return). This patch modifies the output function to unconditionally add a line return irrespective of the return code. Signed-off-by: K.Prasad --- kernel/trace/trace_ksym.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) 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 @@ -391,29 +391,32 @@ static enum print_line_t ksym_trace_outp ret = trace_seq_printf(s, "%-15s %-5d %-3d %-20s ", field->p_name, entry->pid, iter->cpu, field->ksym_name); - if (!ret) - return TRACE_TYPE_PARTIAL_LINE; + if (!ret) { + ret = TRACE_TYPE_PARTIAL_LINE; + goto err_ret; + } + ret = TRACE_TYPE_PARTIAL_LINE; switch (field->ksym_hbp->info.type) { case HW_BREAKPOINT_WRITE: - ret = trace_seq_printf(s, " W "); + if (!trace_seq_printf(s, " W ")) + goto err_ret; break; case HW_BREAKPOINT_RW: - ret = trace_seq_printf(s, " RW "); + if (!trace_seq_printf(s, " RW ")) + goto err_ret; break; default: - return TRACE_TYPE_PARTIAL_LINE; + goto err_ret; } - if (!ret) - return TRACE_TYPE_PARTIAL_LINE; - sprint_symbol(str, field->ip); ret = trace_seq_printf(s, "%-20s\n", str); - if (!ret) - return TRACE_TYPE_PARTIAL_LINE; - - return TRACE_TYPE_HANDLED; + if (ret) + return TRACE_TYPE_HANDLED; +err_ret: + trace_seq_printf(s, "\n"); + return ret; } struct tracer ksym_tracer __read_mostly = -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/