lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51286ABC.6080802@mellanox.com>
Date:	Sat, 23 Feb 2013 09:07:40 +0200
From:	Amir Vadai <amirv@...lanox.com>
To:	Kleber Sacilotto de Souza <klebers@...ux.vnet.ibm.com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: Re: [PATCH] mlx4_en: fix allocation of CPU affinity reverse-map

On 23/02/2013 07:14, Kleber Sacilotto de Souza wrote:
> The mlx4_en driver allocates the number of objects for the CPU affinity
> reverse-map based on the number of rx rings of the device. However,
> mlx4_assign_eq() calls irq_cpu_rmap_add() as many times as IRQ's are
> assigned to EQ's, which can be as large as mlx4_dev->caps.comp_pool. If
> caps.comp_pool is larger than rx_ring_num we will eventually hit the
> BUG_ON() in cpu_rmap_add().
> 
> Fix this problem by allocating space for the maximum number of CPU
> affinity reverse-map objects we might want to add.
> 
> Signed-off-by: Kleber Sacilotto de Souza <klebers@...ux.vnet.ibm.com>
> ---
>  drivers/net/ethernet/mellanox/mlx4/en_netdev.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> index 5944dd6..5385474 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> @@ -1829,7 +1829,7 @@ int mlx4_en_alloc_resources(struct mlx4_en_priv *priv)
>  	}
>  
>  #ifdef CONFIG_RFS_ACCEL
> -	priv->dev->rx_cpu_rmap = alloc_irq_cpu_rmap(priv->rx_ring_num);
> +	priv->dev->rx_cpu_rmap = alloc_irq_cpu_rmap(priv->mdev->dev->caps.comp_pool);
>  	if (!priv->dev->rx_cpu_rmap)
>  		goto err;
>  #endif
> 

Acked-by: Amir Vadai <amirv@...lanox.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ