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