Re: [PATCH V8 03/14] rtla: Add osnoise tool

From: Steven Rostedt
Date: Wed Dec 08 2021 - 17:14:14 EST


On Thu, 2 Dec 2021 16:18:53 +0100
Daniel Bristot de Oliveira <bristot@xxxxxxxxxx> wrote:

> >> + if (!strcmp(context->orig_cpus, context->curr_cpus))
> >> + goto out_done;
> >> +
> >> + retval = write(context->cpus_fd, context->orig_cpus, strlen(context->orig_cpus));
> >
> > 'strlen(context->orig_cpus) + 1' for write size;
> >
> >> + if (retval < strlen(context->orig_cpus))
> >
> > Same here. Check 'strlen(context->orig_cpus) + 1'
>
> Fixed in v9.

And if you used the tracefs_instance_file_write() function, you would not
have had his bug ;-)

-- Steve