Re: [PATCH] staging: vme_user: handle zero image size in read/write

From: Dan Carpenter

Date: Wed Oct 21 2026 - 02:02:23 EST


On Wed, Oct 21, 2026 at 11:41:38AM +0800, LiuJunyuan wrote:
> vme_get_size() can return zero for an unallocated image. The existing
> image_size - 1 checks underflow in that case and can allow an invalid
> position to proceed, wrapping the subsequent count calculation. Check
> image_size and *ppos directly instead.
>
> Signed-off-by: LiuJunyuan <2058432396@xxxxxx>
> ---

This one is a bug fix and needs a Fixes tag.

regards,
dan carpenter