Skip to content

Commit

Permalink
NFC: llcp: Keep the connected socket parent pointer alive
Browse files Browse the repository at this point in the history
And avoid decreasing the ack log twice when dequeueing connected LLCP
sockets.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed Mar 26, 2013
1 parent b315515 commit 39a352a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/nfc/llcp/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ struct sock *nfc_llcp_accept_dequeue(struct sock *parent,
}

if (sk->sk_state == LLCP_CONNECTED || !newsock) {
nfc_llcp_accept_unlink(sk);
list_del_init(&lsk->accept_queue);
sock_put(sk);

if (newsock)
sock_graft(sk, newsock);

Expand Down

0 comments on commit 39a352a

Please sign in to comment.