Re: [PATCH v6] tracing: Bound synthetic-field strings with seq_buf

Steven Rostedt
2026-05-01T17:26:51Z

On Fri, 01 May 2026 12:10:39 -0500
Tom Zanussi <zanussi@kernel.org> wrote:

> > + /* Terminate synthetic_name with a NUL. */
> > + seq_buf_str(&s);
> > +
>
> This doesn't hurt, but is it really needed? I think seq_buf_printf()
> already null-terminates.

Technically it does, but it's not guaranteed to do so. That is, only
seq_buf_str() defines terminating the string in the API.

-- Steve