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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170313.171857.406760790328158776.davem@davemloft.net>
Date:   Mon, 13 Mar 2017 17:18:57 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     Joao.Pinto@...opsys.com
Cc:     peppe.cavallaro@...com, alexandre.torgue@...com,
        netdev@...r.kernel.org
Subject: Re: [PATCH 09/11] net: stmmac: dma channel init prepared for
 multiple queues

From: Joao Pinto <Joao.Pinto@...opsys.com>
Date: Mon, 13 Mar 2017 16:12:40 +0000

> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index e60e077..44db2e3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1732,6 +1732,10 @@ static void stmmac_check_ether_addr(struct stmmac_priv *priv)
>   */
>  static int stmmac_init_dma_engine(struct stmmac_priv *priv)
>  {
> +	u32 rx_channels_count = priv->plat->rx_queues_to_use;
> +	u32 tx_channels_count = priv->plat->tx_queues_to_use;
> +	u32 dummy_dma_rx_phy, dummy_dma_tx_phy = 0;
> +	u32 chan = 0;
>  	int atds = 0;
>  	int ret = 0;
>  

dummy_dma_rx_phy is declared, but not initialized:

> @@ -1749,19 +1753,43 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
>  		return ret;
>  	}
>  
> -	priv->hw->dma->init(priv->ioaddr, priv->plat->dma_cfg,
> -			    priv->dma_tx_phy, priv->dma_rx_phy, atds);
> -
>  	if (priv->synopsys_id >= DWMAC_CORE_4_00) {
> -		priv->rx_tail_addr = priv->dma_rx_phy +
> -			    (DMA_RX_SIZE * sizeof(struct dma_desc));
> -		priv->hw->dma->set_rx_tail_ptr(priv->ioaddr, priv->rx_tail_addr,
> -					       STMMAC_CHAN0);
> +		/* DMA Configuration */
> +		priv->hw->dma->init(priv->ioaddr, priv->plat->dma_cfg,
> +				    dummy_dma_tx_phy, dummy_dma_rx_phy, atds);
> +

Yet it is used here, still uninitialized.

The compiler even warns about this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ