Re: [PATCH] drm/ssd130x: Use kmalloc_array() instead of kmalloc()

From: Javier Martinez Canillas
Date: Wed Sep 17 2025 - 06:49:17 EST


James Flowers <bold.zone2373@xxxxxxxxxxxx> writes:

> Documentation/process/deprecated.rst recommends against the use of
> kmalloc with dynamic size calculations due to the risk of overflow and
> smaller allocation being made than the caller was expecting.
> kmalloc_array avoids this issue.
>
> Signed-off-by: James Flowers <bold.zone2373@xxxxxxxxxxxx>
> ---

Pushed to drm-misc (drm-misc-next). Thanks!

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat