On Mon, Jun 01, 2026 at 01:42:38PM -0700, Nicolin Chen wrote:
> The vEVENTQ file descriptor must reject reads whose buffer cannot hold
> even one event record. Add selftest coverage that exercises both the
> empty-queue path (the upfront size check) and the non-empty path (the
> in-loop check that fires only after an event is fetched).
> 
> For iommufd_veventq_fops_read():
>  - count == 0 and count < sizeof(header) on an empty vEVENTQ both
>    return -EINVAL.
>  - count == 0 and count == sizeof(header) on a non-empty vEVENTQ
>    (event has trailing payload) both return -EINVAL.
> 
> Assisted-by: Claude:claude-opus-4-7
> Signed-off-by: Nicolin Chen <[email protected]>

Reviewed-by: Pranjal Shrivastava <[email protected]>

Thanks,
Praan

Reply via email to