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: <529C40FE.8040908@mellanox.com>
Date:	Mon, 2 Dec 2013 10:12:46 +0200
From:	Amir Vadai <amirv@...lanox.com>
To:	Wei Yang <weiyang@...ux.vnet.ibm.com>, <davem@...emloft.net>,
	<jackm@....mellanox.co.il>, <netdev@...r.kernel.org>
Subject: Re: [PATCH] net/mlx4_core: destroy workqueue when driver fails to
 register

On 02/12/2013 03:44, Wei Yang wrote:
> When driver registration fails, we need to clean up the resources allocated
> before. mlx4_core missed to destroy the workqueue allocated.
> 
> This patch destroies the workqueue when registration fails.
> 
> Signed-off-by: Wei Yang <weiyang@...ux.vnet.ibm.com>
> ---
>  drivers/net/ethernet/mellanox/mlx4/main.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
> index 5789ea2..01fc651 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -2635,6 +2635,8 @@ static int __init mlx4_init(void)
>  		return -ENOMEM;
>  
>  	ret = pci_register_driver(&mlx4_driver);
> +	if (ret < 0)
> +		destroy_workqueue(mlx4_wq);
>  	return ret < 0 ? ret : 0;
>  }
>  
> 

Acked-By: Amir Vadai <amirv@...lanox.com>

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