Re: [PATCH] staging: media: atomisp: prefer kcalloc over kzalloc with multiply
From: Andy Shevchenko
Date: Sun Jun 07 2026 - 03:43:19 EST
On Sun, Jun 7, 2026 at 2:45 AM Andrew Soto <linux@xxxxxxxxxxxxxxx> wrote:
>
> Optimize memory allocation layout in sh_css_params.c by replacing the raw multiplication inside kzalloc() with a type-safe kcalloc() array allocation wrapper.
>
> This prevents potential integer overflow vulnerabilities by validating the array size calculations before interacting with the kernel heap allocator, aligning the driver with modern kernel memory allocation standards.
Wrap the commit message around 72 characters per line.
...
Is this the only case like this in the entire driver?
--
With Best Regards,
Andy Shevchenko