OSDN Git Service
(root)
/
armadillo-ux
/
linux-2.6-armadillo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bluetooth: Do not call rfcomm_session_put() for RFCOMM UA on closed socket
[armadillo-ux/linux-2.6-armadillo.git]
/
net
/
bluetooth
/
rfcomm
/
core.c
diff --git
a/net/bluetooth/rfcomm/core.c
b/net/bluetooth/rfcomm/core.c
index
2b50637
..
89f4a59
100644
(file)
--- a/
net/bluetooth/rfcomm/core.c
+++ b/
net/bluetooth/rfcomm/core.c
@@
-1150,7
+1150,11
@@
static int rfcomm_recv_ua(struct rfcomm_session *s, u8 dlci)
break;
case BT_DISCONN:
- rfcomm_session_put(s);
+ /* When socket is closed and we are not RFCOMM
+ * initiator rfcomm_process_rx already calls
+ * rfcomm_session_put() */
+ if (s->sock->sk->sk_state != BT_CLOSED)
+ rfcomm_session_put(s);
break;
}
}