Re: [PATCH] tracing: Fix race when concurrently splice_read trace_pipe

From: Steven Rostedt
Date: Sat Aug 12 2023 - 17:09:12 EST


On Sat, 12 Aug 2023 10:22:43 +0800
Zheng Yejian <zhengyejian1@xxxxxxxxxx> wrote:

> > And if it wasn't consumed? We just lost it?
>
> If 'iter->ent' was not consumed, trace_find_next_entry_inc() will find
> it again, will it?

No it will not, because it did the "inc". That means the next time it
is called, it will find the next item to read, thinking it already
"consumed" the last one.

-- Steve