--- a/net/nfc/llcp_sock.c +++ b/net/nfc/llcp_sock.c @@ -686,6 +686,10 @@ static int llcp_sock_connect(struct sock ret = -EISCONN; goto error; } + if (sk->sk_state == LLCP_CONNECTING) { + ret = -EINPROGRESS; + goto error; + } dev = nfc_get_device(addr->dev_idx); if (dev == NULL) {