From f27378645673dbfdbd85a2b516219634f5ff5539 Mon Sep 17 00:00:00 2001 From: Vlad Yasevich Date: Thu, 6 Dec 2007 22:50:27 -0800 Subject: [PATCH] --- yaml --- r: 74691 b: refs/heads/master c: f26f7c480555812ca7c4037e0a50fa54afe2cb4a h: refs/heads/master i: 74689: d5d9503201403510b693f39823d2ec7a39260d0f 74687: 0a9dda6a9a389611306862986dd4514cd5879fd0 v: v3 --- [refs] | 2 +- trunk/net/sctp/socket.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8113cba1c3f9..c8ecb758b49b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 56c99d0415e8b778c200f115b198c126243ec351 +refs/heads/master: f26f7c480555812ca7c4037e0a50fa54afe2cb4a diff --git a/trunk/net/sctp/socket.c b/trunk/net/sctp/socket.c index ff8bc95670ed..9f5d7930f54d 100644 --- a/trunk/net/sctp/socket.c +++ b/trunk/net/sctp/socket.c @@ -6325,6 +6325,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, struct sctp_endpoint *newep = newsp->ep; struct sk_buff *skb, *tmp; struct sctp_ulpevent *event; + struct sctp_bind_hashbucket *head; int flags = 0; /* Migrate socket buffer sizes and all the socket level options to the @@ -6342,10 +6343,15 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, newsp->hmac = NULL; /* Hook this new socket in to the bind_hash list. */ + head = &sctp_port_hashtable[sctp_phashfn(inet_sk(oldsk)->num)]; + sctp_local_bh_disable(); + sctp_spin_lock(&head->lock); pp = sctp_sk(oldsk)->bind_hash; sk_add_bind_node(newsk, &pp->owner); sctp_sk(newsk)->bind_hash = pp; inet_sk(newsk)->num = inet_sk(oldsk)->num; + sctp_spin_unlock(&head->lock); + sctp_local_bh_enable(); /* Copy the bind_addr list from the original endpoint to the new * endpoint so that we can handle restarts properly