mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
NFC: Don't hold a NULL connecting LLCP socket lock
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
dadb06f270
commit
5a0f6f3b46
@ -477,8 +477,10 @@ static struct nfc_llcp_sock *nfc_llcp_connecting_sock_get(struct nfc_llcp_local
|
||||
sk_for_each(sk, node, &local->connecting_sockets.head) {
|
||||
llcp_sock = nfc_llcp_sock(sk);
|
||||
|
||||
if (llcp_sock->ssap == ssap)
|
||||
if (llcp_sock->ssap == ssap) {
|
||||
sock_hold(&llcp_sock->sk);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
llcp_sock = NULL;
|
||||
@ -486,8 +488,6 @@ static struct nfc_llcp_sock *nfc_llcp_connecting_sock_get(struct nfc_llcp_local
|
||||
out:
|
||||
read_unlock(&local->connecting_sockets.lock);
|
||||
|
||||
sock_hold(&llcp_sock->sk);
|
||||
|
||||
return llcp_sock;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user