mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Yang Jihong <yangjihong1@huawei.com>
Cc: <mhiramat@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line
Date: Sun, 20 Nov 2022 14:49:56 -0500	[thread overview]
Message-ID: <20221120144956.30bb1725@rorschach.local.home> (raw)
In-Reply-To: <188a48b7-f426-6348-086e-22e56bb07206@huawei.com>

On Fri, 18 Nov 2022 18:21:12 +0800
Yang Jihong <yangjihong1@huawei.com> wrote:

> > That way we can see the broken trace event and not just silently drop it.
> >   
> Ok, will change in next version.(Because iter->seq.seq.len may be 
> smaller than strlen(dots), direct subtraction here may not be appropriate.)

We should only need to do this if the len is maxed out.

Hmm, len is only updated if it did actually copy it.

Perhaps we could just add:

	trace_seq_puts(&iter->seq, "[LINE TOO BIG]\n");

And perhaps that will work?

Anyway, what is triggering this?

-- Steve

  reply	other threads:[~2022-11-20 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14  2:29 Yang Jihong
2022-11-17 21:40 ` Steven Rostedt
2022-11-18 10:21   ` Yang Jihong
2022-11-20 19:49     ` Steven Rostedt [this message]
2022-11-21  8:15       ` Yang Jihong
2022-11-24 13:04       ` Yang Jihong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221120144956.30bb1725@rorschach.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=yangjihong1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®