OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] netns: init dev_base_lock only once
[PATCH] netns: init dev_base_lock only once [message #22910] Wed, 07 November 2007 12:51 Go to next message
Alexey Dobriyan is currently offline  Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
* it already statically initialized
* reinitializing live global spinlock every time netns is
  setup is also wrong

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---

 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 [message #23057 is a reply to message #22910] Sun, 11 November 2007 06:09 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Alexey Dobriyan <adobriyan@sw.ru>
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 <adobriyan@sw.ru>

Good catch.

Applied, thanks Alexey.
Previous Topic: [PATCH 3/3][UNIX] The unix_nr_socks limit can be exceeded
Next Topic: [PATCH] [RESEND] small possible memory leak in FIB rules
Goto Forum:
  


Current Time: Sat Jul 13 15:10:51 GMT 2024

Total time taken to generate the page: 0.02252 seconds