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: <20150107103649.GN21820@casper.infradead.org>
Date:	Wed, 7 Jan 2015 10:36:49 +0000
From:	Thomas Graf <tgraf@...g.ch>
To:	Ying Xue <ying.xue@...driver.com>
Cc:	davem@...emloft.net, jon.maloy@...csson.com,
	Paul.Gortmaker@...driver.com, erik.hugne@...csson.com,
	netdev@...r.kernel.org, tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH net-next v2 6/7] rhashtable: initialize atomic nelems
 variable

On 01/07/15 at 06:26pm, Ying Xue wrote:
> I am not sure whether we really need to reinitialize atomic variable
> again although we have reset it with memset() or something else. But I
> see many places in kernel where we do this, for example:
> 
> Although we use kmem_cache_zalloc() to allocate "net" structure instance
> in net_alloc(), there are still several places where to reinitialize its
> atomic variables again:
> 
> setup_net()
>   atomic_set(&net->use_count, 0);
> 
> rt_genid_init()
>   atomic_set(&net->ipv4.rt_genid, 0);
>   atomic_set(&net->fnhe_genid, 0);
> 
> Can you please definitely confirm that the reinitialisation is redundant
> for us?

I see examples for both, explicit initialization and dependence on
a previous memset. I'm not sure what is the preferred way.

I'll provide my ACK since this obviously doesn't break anything and
leave it up to Dave.

Acked-by: Thomas Graf <tgraf@...g.ch>
--
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