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:   Fri, 17 Jul 2020 08:32:50 +0000
From:   "Hennerich, Michael" <Michael.Hennerich@...log.com>
To:     Liu Jian <liujian56@...wei.com>,
        "alex.aring@...il.com" <alex.aring@...il.com>,
        "stefan@...enfreihafen.org" <stefan@...enfreihafen.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>, "kjlu@....edu" <kjlu@....edu>,
        "linux-wpan@...r.kernel.org" <linux-wpan@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next] ieee802154: fix one possible memleak in
 adf7242_probe


> -----Original Message-----
> From: Liu Jian <liujian56@...wei.com>
> Sent: Freitag, 17. Juli 2020 11:01
> To: Hennerich, Michael <Michael.Hennerich@...log.com>;
> alex.aring@...il.com; stefan@...enfreihafen.org; davem@...emloft.net;
> kuba@...nel.org; kjlu@....edu; linux-wpan@...r.kernel.org;
> netdev@...r.kernel.org
> Subject: [PATCH net-next] ieee802154: fix one possible memleak in
> adf7242_probe
> 
> When probe fail, we should destroy the workqueue.
> 
> Fixes: 2795e8c25161 ("net: ieee802154: fix a potential NULL pointer
> dereference")
> Signed-off-by: Liu Jian <liujian56@...wei.com>

Acked-by: Michael Hennerich <michael.hennerich@...log.com>

> ---
>  drivers/net/ieee802154/adf7242.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ieee802154/adf7242.c
> b/drivers/net/ieee802154/adf7242.c
> index 5a37514e4234..8dbccec6ac86 100644
> --- a/drivers/net/ieee802154/adf7242.c
> +++ b/drivers/net/ieee802154/adf7242.c
> @@ -1262,7 +1262,7 @@ static int adf7242_probe(struct spi_device *spi)
>  					     WQ_MEM_RECLAIM);
>  	if (unlikely(!lp->wqueue)) {
>  		ret = -ENOMEM;
> -		goto err_hw_init;
> +		goto err_alloc_wq;
>  	}
> 
>  	ret = adf7242_hw_init(lp);
> @@ -1294,6 +1294,8 @@ static int adf7242_probe(struct spi_device *spi)
>  	return ret;
> 
>  err_hw_init:
> +	destroy_workqueue(lp->wqueue);
> +err_alloc_wq:
>  	mutex_destroy(&lp->bmux);
>  	ieee802154_free_hw(lp->hw);
> 
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ