[PATCH] netns: init dev_base_lock only once

STALE6878d

2 messages, 2 authors, 2007-11-11 · open the first message on its own page

[PATCH] netns: init dev_base_lock only once

From: Alexey Dobriyan <hidden>
Date: 2007-11-07 12:51:43

* it already statically initialized
* reinitializing live global spinlock every time netns is
  setup is also wrong

Signed-off-by: Alexey Dobriyan <redacted>
---

 net/core/dev.c |    1 -
 1 file changed, 1 deletion(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4330,7 +4330,6 @@ static struct hlist_head *netdev_create_hash(void)
 static int __net_init netdev_init(struct net *net)
 {
 	INIT_LIST_HEAD(&net->dev_base_head);
-	rwlock_init(&dev_base_lock);
 
 	net->dev_name_head = netdev_create_hash();
 	if (net->dev_name_head == NULL)

Re: [PATCH] netns: init dev_base_lock only once

From: David Miller <davem@davemloft.net>
Date: 2007-11-11 06:09:42

From: Alexey Dobriyan <redacted>
Date: Wed, 7 Nov 2007 15:51:33 +0300
* it already statically initialized
* reinitializing live global spinlock every time netns is
  setup is also wrong

Signed-off-by: Alexey Dobriyan <redacted>
Good catch.

Applied, thanks Alexey.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help