[PATCH net 3/3] net/mlx5: IRQ, Fix null string in debug print

Tariq Toukan posted 3 patches 11 months, 2 weeks ago
[PATCH net 3/3] net/mlx5: IRQ, Fix null string in debug print
Posted by Tariq Toukan 11 months, 2 weeks ago
From: Shay Drory <shayd@nvidia.com>

irq_pool_alloc() debug print can print a null string.
Fix it by providing a default string to print.

Fixes: 71e084e26414 ("net/mlx5: Allocating a pool of MSI-X vectors for SFs")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501141055.SwfIphN0-lkp@intel.com/
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
index 7db9cab9bedf..d9362eabc6a1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
@@ -572,7 +572,7 @@ irq_pool_alloc(struct mlx5_core_dev *dev, int start, int size, char *name,
 	pool->min_threshold = min_threshold * MLX5_EQ_REFS_PER_IRQ;
 	pool->max_threshold = max_threshold * MLX5_EQ_REFS_PER_IRQ;
 	mlx5_core_dbg(dev, "pool->name = %s, pool->size = %d, pool->start = %d",
-		      name, size, start);
+		      name ? name : "mlx5_pcif_pool", size, start);
 	return pool;
 }
 
-- 
2.45.0
Re: [PATCH net 3/3] net/mlx5: IRQ, Fix null string in debug print
Posted by Kalesh Anakkur Purayil 11 months, 2 weeks ago
On Tue, Feb 25, 2025 at 12:58 PM Tariq Toukan <tariqt@nvidia.com> wrote:
>
> From: Shay Drory <shayd@nvidia.com>
>
> irq_pool_alloc() debug print can print a null string.
> Fix it by providing a default string to print.
>
> Fixes: 71e084e26414 ("net/mlx5: Allocating a pool of MSI-X vectors for SFs")
> Signed-off-by: Shay Drory <shayd@nvidia.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202501141055.SwfIphN0-lkp@intel.com/
> Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>


-- 
Regards,
Kalesh AP