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: <51613740.6050501@windriver.com>
Date:	Sun, 7 Apr 2013 17:07:12 +0800
From:	Ying Xue <ying.xue@...driver.com>
To:	Patrick McHardy <kaber@...sh.net>
CC:	<jon.maloy@...csson.com>, <allan.stephens@...driver.com>,
	<netdev@...r.kernel.org>, <roland@...nel.org>,
	<sean.hefty@...el.com>, <hal.rosenstock@...il.com>,
	<linux-rdma@...r.kernel.org>
Subject: Re: [PATCH 4/5] tipc: add InfiniBand media type


> --- a/net/tipc/core.c
> +++ b/net/tipc/core.c
> @@ -82,6 +82,7 @@ static void tipc_core_stop_net(void)
>  {
>  	tipc_net_stop();
>  	tipc_eth_media_stop();
> +	tipc_ib_media_stop();
>  }
>  
>  /**
> @@ -93,8 +94,17 @@ int tipc_core_start_net(unsigned long addr)
>  
>  	tipc_net_start(addr);
>  	res = tipc_eth_media_start();
> -	if (res)
> -		tipc_core_stop_net();
> +	if (res < 0)
> +		goto err1;
> +	res = tipc_ib_media_start();
> +	if (res < 0)
> +		goto err2;
> +	return res;
> +
> +err2:
> +	tipc_eth_media_stop();

Why do we need to call tipc_eth_media_stop() separately?
In any failed case, we will finally invoke tipc_core_stop_net() which
already places tipc_eth_media_stop().

> +err1:
> +	tipc_core_stop_net();
>  	return res;
>  }
>  

Regards,
Ying
--
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