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: <5264EBD6.7060302@st.com>
Date:	Mon, 21 Oct 2013 10:54:46 +0200
From:	Giuseppe CAVALLARO <peppe.cavallaro@...com>
To:	Jimmy Perchet <jimmy.perchet@...rot.com>
Cc:	<netdev@...r.kernel.org>
Subject: Re: [PATCH RFC 2/5] net:stmmac: fix rx buffer allocation.

On 10/16/2013 5:24 PM, Jimmy Perchet wrote:
> Rx buffers used wrong size, because priv->dma_buf_sz was updated after allocation.
>
> Signed-off-by: Jimmy Perchet <jimmy.perchet@...rot.com>

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@...com>

> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 170f043..0015175 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -998,6 +998,9 @@ static int init_dma_desc_rings(struct net_device *dev)
>   	if (bfsize < BUF_SIZE_16KiB)
>   		bfsize = stmmac_set_bfsize(dev->mtu, priv->dma_buf_sz);
>
> +	priv->dma_buf_sz = bfsize;
> +	buf_sz = bfsize;
> +
>   	if (netif_msg_probe(priv))
>   		pr_debug("%s: txsize %d, rxsize %d, bfsize %d\n", __func__,
>   			 txsize, rxsize, bfsize);
> @@ -1087,8 +1090,6 @@ static int init_dma_desc_rings(struct net_device *dev)
>   	}
>   	priv->cur_rx = 0;
>   	priv->dirty_rx = (unsigned int)(i - rxsize);
> -	priv->dma_buf_sz = bfsize;
> -	buf_sz = bfsize;
>
>   	/* Setup the chained descriptor addresses */
>   	if (priv->mode == STMMAC_CHAIN_MODE) {
>

--
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