netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NETLINK] hlist initilization
@ 2004-09-24  1:05 Pablo Neira
  2004-09-24  1:16 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira @ 2004-09-24  1:05 UTC (permalink / raw)
  To: netdev, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

Hi Davem,

This patch adds proper initialization for hlist. It applies to 
af_netlink.c with the workqueue patch reverted.

Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>

regards,
Pablo

[-- Attachment #2: hlist-initialize.patch --]
[-- Type: text/x-patch, Size: 459 bytes --]

===== net/netlink/af_netlink.c 1.55 vs edited =====
--- 1.55/net/netlink/af_netlink.c	Thu Sep 23 20:27:46 2004
+++ edited/net/netlink/af_netlink.c	Sat Oct 23 19:09:17 2004
@@ -1191,6 +1191,10 @@
 static int __init netlink_proto_init(void)
 {
 	struct sk_buff *dummy_skb;
+	int i;
+
+	for(i=0; i<MAX_LINKS; i++)
+		INIT_HLIST_HEAD(&nl_table[i]);
 
 	if (sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb)) {
 		printk(KERN_CRIT "netlink_init: panic\n");

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [NETLINK] hlist initilization
  2004-09-24  1:05 [NETLINK] hlist initilization Pablo Neira
@ 2004-09-24  1:16 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-09-24  1:16 UTC (permalink / raw)
  To: Pablo Neira; +Cc: netdev

On Fri, 24 Sep 2004 03:05:56 +0200
Pablo Neira <pablo@eurodev.net> wrote:

> This patch adds proper initialization for hlist. It applies to 
> af_netlink.c with the workqueue patch reverted.

nl_table[] is in the BSS and therefore will be
properly zero initialized already.

I took advantage of this same property in the
net/ipv4/fib_hash.c changes.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-24  1:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-24  1:05 [NETLINK] hlist initilization Pablo Neira
2004-09-24  1:16 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).