Re: [PATCH] staging: most: video: fix read() length underflow
From: Alexandru Hossu
Date: Thu Mar 05 2026 - 05:16:49 EST
Hi Dan,
Thanks for the detailed review.
You are right: given how fh->offs is set and the single-reader guard via
atomic_inc_and_test(&mdev->access_ref), fh->offs should not exceed
mbo->processed_length, so my underflow concern is unfounded. I will drop
this patch.
I also appreciate the guidance about documenting variable invariants and
where they are set. I will include that analysis up front for similar
changes in the future.
Regards,
Alexandru