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: <alpine.LNX.2.01.1012091501270.21049@obet.zrqbmnf.qr>
Date:	Thu, 9 Dec 2010 15:03:08 +0100 (CET)
From:	Jan Engelhardt <jengelh@...ozas.de>
To:	Changli Gao <xiaosuo@...il.com>
cc:	Patrick McHardy <kaber@...sh.net>,
	"David S. Miller" <davem@...emloft.net>,
	netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] netfilter: don't need to initialize instance_table

On Thursday 2010-12-09 11:10, Changli Gao wrote:

>Since instance_table is a static array, and has been zeroed already, we
>don't need to take CPU cycles to initialize it.
>
>Signed-off-by: Changli Gao <xiaosuo@...il.com>
>---
> net/netfilter/nfnetlink_queue.c |    3 ---
> 1 file changed, 3 deletions(-)
>diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
>index 68e67d1..9c80d6f 100644
>--- a/net/netfilter/nfnetlink_queue.c
>+++ b/net/netfilter/nfnetlink_queue.c
>@@ -893,9 +893,6 @@ static int __init nfnetlink_queue_init(void)
> {
> 	int i, status = -ENOMEM;
> 
>-	for (i = 0; i < INSTANCE_BUCKETS; i++)
>-		INIT_HLIST_HEAD(&instance_table[i]);
>-
> 	netlink_register_notifier(&nfqnl_rtnl_notifier);
> 	status = nfnetlink_subsys_register(&nfqnl_subsys);
> 	if (status < 0) {

This is here for correctness and documentation. If the hlist 
implementation changed, one would have a hard time figuring out the 
callsites which then need to add the initialization back.
--
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