diff options
-rw-r--r-- | net/sctp/socket.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 2fc036699d48..67861a8f00cb 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -6123,8 +6123,11 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, | |||
6123 | * queued to the backlog. This prevents a potential race between | 6123 | * queued to the backlog. This prevents a potential race between |
6124 | * backlog processing on the old socket and new-packet processing | 6124 | * backlog processing on the old socket and new-packet processing |
6125 | * on the new socket. | 6125 | * on the new socket. |
6126 | * | ||
6127 | * The caller has just allocated newsk so we can guarantee that other | ||
6128 | * paths won't try to lock it and then oldsk. | ||
6126 | */ | 6129 | */ |
6127 | sctp_lock_sock(newsk); | 6130 | lock_sock_nested(newsk, SINGLE_DEPTH_NESTING); |
6128 | sctp_assoc_migrate(assoc, newsk); | 6131 | sctp_assoc_migrate(assoc, newsk); |
6129 | 6132 | ||
6130 | /* If the association on the newsk is already closed before accept() | 6133 | /* If the association on the newsk is already closed before accept() |