projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bluetooth: Fix locking issue during fast SCO reconnection.
[firefly-linux-kernel-4.4.55.git]
/
net
/
bluetooth
/
sco.c
diff --git
a/net/bluetooth/sco.c
b/net/bluetooth/sco.c
index 09051e4cbade132fd6e106fd48c1e5e36f36eb1a..75f843d5423a4750f18f698a57130c6a96f71f23 100644
(file)
--- a/
net/bluetooth/sco.c
+++ b/
net/bluetooth/sco.c
@@
-965,7
+965,9
@@
static int sco_sock_shutdown(struct socket *sock, int how)
if (!sk)
return 0;
+ sock_hold(sk);
lock_sock(sk);
+
if (!sk->sk_shutdown) {
sk->sk_shutdown = SHUTDOWN_MASK;
sco_sock_clear_timer(sk);
@@
-976,7
+978,10
@@
static int sco_sock_shutdown(struct socket *sock, int how)
err = bt_sock_wait_state(sk, BT_CLOSED,
sk->sk_lingertime);
}
+
release_sock(sk);
+ sock_put(sk);
+
return err;
}