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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 15 Dec 2019 15:27:31 +0100
From:   Markus Elfring <Markus.Elfring@....de>
To:     Navid Emamdoost <navid.emamdoost@...il.com>,
        linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Linus Walleij <linus.walleij@...aro.org>,
        Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        Navid Emamdoost <emamd001@....edu>,
        Hans Ulli Kroll <ulli.kroll@...glemail.com>
Subject: Re: [PATCH] net: gemini: Fix memory leak in gmac_setup_txqs

> +++ b/drivers/net/ethernet/cortina/gemini.c
> @@ -576,6 +576,8 @@ static int gmac_setup_txqs(struct net_device *netdev)
>
>  	if (port->txq_dma_base & ~DMA_Q_BASE_MASK) {
>  		dev_warn(geth->dev, "TX queue base is not aligned\n");
> +		dma_free_coherent(geth->dev, len * sizeof(*desc_ring),
> +				  desc_ring, port->txq_dma_base);
>  		kfree(skb_tab);
>  		return -ENOMEM;
>  	}

The added function call seems to be fine.
Would you like to avoid a bit of duplicate code for the exception handling?

Regards,
Markus

Powered by blists - more mailing lists