2024-02-06 12:33:59

by Cabiddu, Giovanni

[permalink] [raw]
Subject: Re: [PATCH] crypto: qat - use kcalloc() instead of kzalloc()

On Mon, Jan 29, 2024 at 06:57:28AM -0600, Lenko Donchev wrote:
> We are trying to get rid of all multiplications from allocation
> functions to prevent integer overflows[1]. Here the multiplication is
> obviously safe, but using kcalloc() is more appropriate and improves
> readability. This patch has no effect on runtime behavior.
>
> Link: https://github.com/KSPP/linux/issues/162 [1]
> Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [2]
>
> Signed-off-by: Lenko Donchev <[email protected]>
Thanks for your patch.
The same change was already applied to the cryptodev tree about two
weeks ago. See 4da3bc65d218 ("crypto: qat - use kcalloc_node() instead of
kzalloc_node()") [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=4da3bc65d218605557696109e42cfeee666d601f

Regards,

--
Giovanni