On (19/11/05 15:12), Alexander Potapenko wrote: [..] > > > > + * If any of vscnprintf() arguments is uninitialized, KMSAN will report > > > > + * one or more errors and also probably mark text_len as uninitialized. > > > > + * Initialize |text_len| to prevent the errors from spreading further. > > > > + */ > > > > + text_len = KMSAN_INIT_VALUE(vscnprintf(text, sizeof(textbuf), fmt, > > > > + args)); > > > > Or maybe this can be > > > > text_len = vscnprintf(text, sizeof(textbuf), fmt, args); > > + KMSAN_INIT_VALUE(text_len); > This isn't how KMSAN_INIT_VALUE works. It takes a value that may be > uninitialized and returns the same value marked as initialized. Ah, I see. > Shall I do: > text_len = KMSAN_INIT_VALUE(text_len); > instead? Yes, +1 from me. -ss