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: <87wq2qx8u6.fsf@x220.int.ebiederm.org>
Date:	Mon, 09 Mar 2015 14:35:29 -0500
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>, edumazet@...gle.com,
	netdev@...r.kernel.org, stephen@...workplumber.org,
	nicolas.dichtel@...nd.com, roopa@...ulusnetworks.com,
	hannes@...essinduktion.org, ddutt@...ulusnetworks.com,
	vipin@...ulusnetworks.com, shmulik.ladkani@...il.com,
	dsahern@...il.com
Subject: Re: [PATCH net-next 6/6] tcp_metrics: Use a single hash table for all network namespaces.

Eric Dumazet <eric.dumazet@...il.com> writes:

> On Mon, 2015-03-09 at 13:31 -0500, Eric W. Biederman wrote:
>
>> @@ -1167,17 +1173,22 @@ static void __net_exit tcp_net_metrics_exit(struct net *net)
>>  {
>>  	unsigned int i;
>>  
>> -	for (i = 0; i < (1U << net->ipv4.tcp_metrics_hash_log) ; i++) {
>> +	if (net != &init_net) {
>> +		tcp_metrics_flush_all(net);
>> +		return;
>> +	}
>
> Note this _very_ unlikely (read: not possible) that
> tcp_net_metrics_exit() will ever be called on init_net
>
> So I would remove all this code.

If the line:
	ret = genl_register_family_with_ops(&tcp_metrics_nl_family,
					    tcp_metrics_nl_ops);

fails then this code will be called with net == &init_net.

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