Hi Jonathan,

On Tue, Sep 23, 2025 at 09:23:33PM +0000, Jonathan Cavitt wrote:
> Add error handling for the following VFIO_DEVICE_SET_IRQS cases with
> respect to the hdr struct:
> 
> - More than one VFIO_IRQ_DATA_TYPE_MASK flag is set in hdr.flags
> - More than one VFIO_IRQ_ACTION_TYPE_MASK flag is set in hdr.flags
> - hdr.count is not specified
> 
> Note that since hdr.count != 0, data_size != 0 is guaranteed unless
> vfio_set_irqs_validate_and_prepare fails and returns an error.  So, we
> no longer need to check data_size before running memdup_user because
> checking the return value of the function is sufficient.
> 
> v2: Use correct name for mask
> 
> v3: Use is_power_of_2 over hweight32 as it's more efficient (Andi)
> 
> Signed-off-by: Jonathan Cavitt <[email protected]>
> Cc: Andi Shyti <[email protected]>
> Reviewed-by: Zhenyu Wang <[email protected]>

merged to drm-intel-next.

Thank you,
Andi

Reply via email to