Thread (19 messages) flat view 19 messages, 2 authors, 2011-02-24
STALE5649d

[PATCH net-next 14/17] tipc: Add in missing lock during link initialization

From: Paul Gortmaker <hidden>
Date: 2011-02-24 01:27:16
Subsystem: networking [general], the rest, tipc network layer · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Jon Maloy

From: Allan Stephens <redacted>

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 <redacted>
Signed-off-by: Paul Gortmaker <redacted>
---
 net/tipc/link.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 754e310..89fbb6d 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -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);
 }
 
 /**
-- 
1.7.3.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help