lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line
From
Date
Hello,

On 2022/11/21 3:49, Steven Rostedt wrote:
> 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");
>
The v3 patch has been sent according to this solution.

Thanks,
Yang

\
 
 \ /
  Last update: 2022-11-24 14:04    [W:0.065 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site