]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tipc: Add in missing lock during link initialization
authorAllan Stephens <Allan.Stephens@windriver.com>
Mon, 24 Jan 2011 21:22:43 +0000 (16:22 -0500)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 23 Feb 2011 23:05:19 +0000 (18:05 -0500)
Ensure that the routine that starts up processing on a newly created
link endpoint takes the spinlock of the node object that owns the link,
to prevent possible conflicts with processing involving other links
owned by that node object.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/link.c

index 754e3109038becc7fc92cb60c14ac53ee956577d..89fbb6d6e956cacfe202a0755eaf277a7ba292e3 100644 (file)
@@ -388,7 +388,9 @@ void tipc_link_delete(struct link *l_ptr)
 
 static void link_start(struct link *l_ptr)
 {
+       tipc_node_lock(l_ptr->owner);
        link_state_event(l_ptr, STARTING_EVT);
+       tipc_node_unlock(l_ptr->owner);
 }
 
 /**