Re: [PATCH] media: vidtv: fix uninitialized args.buf_sz passed by value

From: Abd-Alrhman Masalkhi

Date: Sat Feb 21 2026 - 05:31:30 EST


On Fri, Feb 20, 2026 at 21:39 +0800, Ding Yihan wrote:
> Hi Thomas and Abd-Alrhman,
>
> While looking into this exact same syzbot report, I noticed that
> `vidtv_ts_pcr_write_into()` in the same file also suffers from the
> exact same pass-by-value anti-pattern (passing `struct pcr_write_args` by value).
>
> Since `pcr_write_args` also contains implicit padding, it remains a potential trigger
> for identical KMSAN uninit-value warnings during fuzzing in the future.
>
> Also, regarding Thomas's concern about modifying shared data: passing the struct
> as a `const pointer` (e.g., `const struct null_packet_write_args *`)
> would perfectly guarantee that the state remains read-only.
>
> Thomas, would it be worth submitting a separate patch now to fix `vidtv_ts_pcr_write_into()`
> to prevent future KMSAN errors? Or would you prefer this to be addressed together in Abd-Alrhman's v2?
>
> Best regards,
> Yihan Ding
>

Hi Yihan Ding,

Thanks again for pointing this out earlier.

I've added a fix for vidtv_ts_pcr_write_into() in v2, and I'd like to
include a Suggested-by: tag for you in the patch. I'm still new here,
but my understanding is that Suggested-by is the appropriate tag in
this case.

--
Best Regards,
Abd-Alrhman