From 50820cbd8928e256d56fbe3c3b9757e29af7e845 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Jun 2007 15:14:46 -0700 Subject: [PATCH] --- yaml --- r: 58106 b: refs/heads/master c: 5131a184a3458d9ac47d9eba032cf4c4d3295afd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/sctp/socket.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 63376873e544..1c0c2d024fd9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 186e234358ba29a4094d0c8c0d3ea00f84d32a3e +refs/heads/master: 5131a184a3458d9ac47d9eba032cf4c4d3295afd diff --git a/trunk/net/sctp/socket.c b/trunk/net/sctp/socket.c index 2fc036699d48..67861a8f00cb 100644 --- a/trunk/net/sctp/socket.c +++ b/trunk/net/sctp/socket.c @@ -6123,8 +6123,11 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, * queued to the backlog. This prevents a potential race between * backlog processing on the old socket and new-packet processing * on the new socket. + * + * The caller has just allocated newsk so we can guarantee that other + * paths won't try to lock it and then oldsk. */ - sctp_lock_sock(newsk); + lock_sock_nested(newsk, SINGLE_DEPTH_NESTING); sctp_assoc_migrate(assoc, newsk); /* If the association on the newsk is already closed before accept()