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]
Date:	Sat, 23 Feb 2013 09:05:47 +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 device tx_cq

On 23/02/2013 02:58, Kleber Sacilotto de Souza wrote:
> The memory to hold the network device tx_cq is not being allocated with
> the correct size in mlx4_en_init_netdev(). It should use MAX_TX_RINGS
> instead of MAX_RX_RINGS. This can cause problems if the number of tx
> rings being used is greater than MAX_RX_RINGS.
> 
> 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 5088dc5..5944dd6 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> @@ -2067,7 +2067,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
>  		err = -ENOMEM;
>  		goto out;
>  	}
> -	priv->tx_cq = kzalloc(sizeof(struct mlx4_en_cq) * MAX_RX_RINGS,
> +	priv->tx_cq = kzalloc(sizeof(struct mlx4_en_cq) * MAX_TX_RINGS,
>  			      GFP_KERNEL);
>  	if (!priv->tx_cq) {
>  		err = -ENOMEM;
> 

(sorry for double posting - tried to send from my tablet in plain text
without success).

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