Re: [PATCH RESEND] accel/habanalabs: Replace kmalloc_array + copy_from_user with memdup_array_user

From: Sinyuk, Konstantin

Date: Sat Nov 29 2025 - 14:10:32 EST


On 11/3/2025 11:15 AM, Thorsten Blum wrote:
> Replace kmalloc_array() followed by copy_from_user() with
> memdup_array_user() to improve and simplify cs_ioctl_engine_cores(),
> cs_ioctl_engines(), and hl_multi_cs_wait_ioctl().
>
> Remove the unused variable 'size_to_copy' from hl_multi_cs_wait_ioctl().
>
> No functional changes intended.
>
> Reviewed-by: Karol Wachowski <karol.wachowski@xxxxxxxxxxxxxxx>
> Reviewed-by: Konstantin Sinyuk <konstantin.sinyuk@xxxxxxxxx>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>

Applied to accel/habanalabs-next, thanks.