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: never linger on process exit
[firefly-linux-kernel-4.4.55.git]
/
net
/
bluetooth
/
l2cap_sock.c
diff --git
a/net/bluetooth/l2cap_sock.c
b/net/bluetooth/l2cap_sock.c
index 9bb4d1b3a48382301ba9af14c392b7754f4198e8..0bc67dc5dccec30f890d47aabfc413f39db833c4 100644
(file)
--- a/
net/bluetooth/l2cap_sock.c
+++ b/
net/bluetooth/l2cap_sock.c
@@
-1112,7
+1112,8
@@
static int l2cap_sock_shutdown(struct socket *sock, int how)
l2cap_chan_close(chan, 0);
lock_sock(sk);
- if (sock_flag(sk, SOCK_LINGER) && sk->sk_lingertime)
+ if (sock_flag(sk, SOCK_LINGER) && sk->sk_lingertime &&
+ !(current->flags & PF_EXITING))
err = bt_sock_wait_state(sk, BT_CLOSED,
sk->sk_lingertime);
}