summaryrefslogtreecommitdiff
path: root/net/tipc/subscr.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-05-13 02:42:28 +0400
committerDavid S. Miller <davem@davemloft.net>2008-05-13 02:42:28 +0400
commit7ef43ebaa538e0cc9063cbf84593a05091bcace2 (patch)
treed2bac748f6620cc2f217672105918b2116f6c958 /net/tipc/subscr.c
parent4e3e6dcb43c3669a8817cb3d0f920f91661afd98 (diff)
downloadlinux-7ef43ebaa538e0cc9063cbf84593a05091bcace2.tar.xz
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 'net/tipc/subscr.c')
-rw-r--r--net/tipc/subscr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 8c01ccd3626c..8f8d0a6c1c16 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -474,6 +474,7 @@ static void subscr_named_msg_event(void *usr_handle,
kfree(subscriber);
return;
}
+ spin_unlock_bh(subscriber->lock);
/* Establish a connection to subscriber */