Explorar o código

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>
Samuel Ortiz %!s(int64=12) %!d(string=hai) anos
pai
achega
39a352a5b5
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      net/nfc/llcp/sock.c

+ 3 - 1
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);