Re: [PATCH v1 4/7] iommufd: Reject invalid read count in iommufd_fault_fops_read()

From: Pranjal Shrivastava

Date: Wed Jun 03 2026 - 10:22:09 EST


On Mon, Jun 01, 2026 at 01:42:35PM -0700, Nicolin Chen wrote:
> The read count must be large enough to hold one fault or a group's faults.
>
> iommufd_fault_fops_read() does not validate the count, but returns 0 as if
> the read had succeeded while leaving the pending fault in the queue.
>
> Return -EINVAL in the undersize cases.
>
> Fixes: 07838f7fd529 ("iommufd: Add iommufd fault object")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>

Reviewed-by: Pranjal Shrivastava <praan@xxxxxxxxxx>

Thanks,
Praan