diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-03-26 14:35:57 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-03-26 14:35:57 +0100 |
commit | 39a352a5b5896403ad4ce842a9bc3845a01c02cd (patch) | |
tree | cdfb4e049b15d7f78ea7c19731c5b12206774794 /net/nfc | |
parent | b3155155440190de78fb501953136a6c5b82e327 (diff) | |
download | linux-stable-39a352a5b5896403ad4ce842a9bc3845a01c02cd.tar.gz linux-stable-39a352a5b5896403ad4ce842a9bc3845a01c02cd.tar.bz2 linux-stable-39a352a5b5896403ad4ce842a9bc3845a01c02cd.zip |
NFC: llcp: Keep the connected socket parent pointer alive
And avoid decreasing the ack log twice when dequeueing connected LLCP
sockets.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/llcp/sock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index e488e440186a..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, } 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); |