aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tipc
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-05-12 18:42:28 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-12 18:42:28 -0400
commit7ef43ebaa538e0cc9063cbf84593a05091bcace2 (patch)
treed2bac748f6620cc2f217672105918b2116f6c958 /include/net/tipc
parent4e3e6dcb43c3669a8817cb3d0f920f91661afd98 (diff)
tipc: Fix race condition when creating socket or native port
This patch eliminates the (very remote) chance of a crash resulting from a partially initialized socket or native port unexpectedly receiving a message. Now, during the creation of a socket or native port, the underlying generic port's lock is not released until all initialization required to handle incoming messages has been done. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tipc')
-rw-r--r--include/net/tipc/tipc_port.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/tipc/tipc_port.h b/include/net/tipc/tipc_port.h
index 11105bcc4457..9923e41a8215 100644
--- a/include/net/tipc/tipc_port.h
+++ b/include/net/tipc/tipc_port.h
@@ -84,7 +84,8 @@ struct tipc_port {
84u32 tipc_createport_raw(void *usr_handle, 84u32 tipc_createport_raw(void *usr_handle,
85 u32 (*dispatcher)(struct tipc_port *, struct sk_buff *), 85 u32 (*dispatcher)(struct tipc_port *, struct sk_buff *),
86 void (*wakeup)(struct tipc_port *), 86 void (*wakeup)(struct tipc_port *),
87 const u32 importance); 87 const u32 importance,
88 struct tipc_port **tp_ptr);
88 89
89int tipc_reject_msg(struct sk_buff *buf, u32 err); 90int tipc_reject_msg(struct sk_buff *buf, u32 err);
90 91