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:   Mon, 10 Jul 2017 08:22:06 +0200
From:   Giuseppe CAVALLARO <peppe.cavallaro@...com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        <alexandre.torgue@...com>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH 2/3] net: stmmac: Fix error handling path in
 'alloc_dma_tx_desc_resources()'

On 7/8/2017 9:46 AM, Christophe JAILLET wrote:
> If the first 'kmalloc_array' within the loop fails, we should free what
> as already been allocated, as done in all other error handling path.
>
> Fixes: ce736788e8a9 ("net: stmmac: adding multiple buffers for TX")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@...com>
> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 4322fa4a13e8..07d486a70118 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1561,7 +1561,7 @@ static int alloc_dma_tx_desc_resources(struct stmmac_priv *priv)
>   						    sizeof(*tx_q->tx_skbuff_dma),
>   						    GFP_KERNEL);
>   		if (!tx_q->tx_skbuff_dma)
> -			return -ENOMEM;
> +			goto err_dma_buffers;
>   
>   		tx_q->tx_skbuff = kmalloc_array(DMA_TX_SIZE,
>   						sizeof(struct sk_buff *),


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ