diff options
Diffstat (limited to 'net/nfc/llcp/sock.c')
-rw-r--r-- | net/nfc/llcp/sock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index 5332751943a9..8f025746f337 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c | |||
@@ -270,7 +270,9 @@ struct sock *nfc_llcp_accept_dequeue(struct sock *parent, | |||
270 | } | 270 | } |
271 | 271 | ||
272 | if (sk->sk_state == LLCP_CONNECTED || !newsock) { | 272 | if (sk->sk_state == LLCP_CONNECTED || !newsock) { |
273 | nfc_llcp_accept_unlink(sk); | 273 | list_del_init(&lsk->accept_queue); |
274 | sock_put(sk); | ||
275 | |||
274 | if (newsock) | 276 | if (newsock) |
275 | sock_graft(sk, newsock); | 277 | sock_graft(sk, newsock); |
276 | 278 | ||
@@ -278,6 +280,8 @@ struct sock *nfc_llcp_accept_dequeue(struct sock *parent, | |||
278 | 280 | ||
279 | pr_debug("Returning sk state %d\n", sk->sk_state); | 281 | pr_debug("Returning sk state %d\n", sk->sk_state); |
280 | 282 | ||
283 | sk_acceptq_removed(parent); | ||
284 | |||
281 | return sk; | 285 | return sk; |
282 | } | 286 | } |
283 | 287 | ||
@@ -462,8 +466,6 @@ static int llcp_sock_release(struct socket *sock) | |||
462 | nfc_llcp_accept_unlink(accept_sk); | 466 | nfc_llcp_accept_unlink(accept_sk); |
463 | 467 | ||
464 | release_sock(accept_sk); | 468 | release_sock(accept_sk); |
465 | |||
466 | sock_orphan(accept_sk); | ||
467 | } | 469 | } |
468 | } | 470 | } |
469 | 471 | ||