Re: [PATCH net v1] octeontx2-af: Initialize bitmap arrays.
From: Simon Horman
Date: Thu Jan 25 2024 - 06:41:43 EST
On Thu, Jan 25, 2024 at 12:04:14PM +0530, Ratheesh Kannoth wrote:
> kmalloc_array() without __GFP_ZERO flag does not initializes
> memory to zero. This causes issues with bitmap. Use __GFP_ZERO
> to fix the issue.
>
> Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs")
> Signed-off-by: Ratheesh Kannoth <rkannoth@xxxxxxxxxxx>
>
> ChangeLogs:
> v0 -> v1: Removed devm_kcalloc()._
Hi Ratheesh,
sorry for missing this in my first review,
but perhaps it is better to use bitmap_zalloc() and bitmap_free()
as suggested by Brett Creeley.
Link: https://lore.kernel.org/all/cf035125-d7fb-4423-8f64-a5be7505243d@xxxxxxx/