mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
bluetooth: Check for hcon during during sock_close
It is possible that during BT OFF operation the hcon could be released from a tasklet context while we are trying to send the l2cap disconnect req. Make sure that hcon is valid before dereferencing it during l2cap disconnect req. CRs-fixed: 383345 Change-Id: Icb12c62560013b5ebb047c1c5d4bfe04b3a793ef Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
This commit is contained in:
parent
3215d227ff
commit
30ff7fbdaf
1 changed files with 3 additions and 0 deletions
|
@ -701,6 +701,9 @@ void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len, void *d
|
|||
if (!skb)
|
||||
return;
|
||||
|
||||
if (conn->hcon == NULL || conn->hcon->hdev == NULL)
|
||||
return;
|
||||
|
||||
if (lmp_no_flush_capable(conn->hcon->hdev))
|
||||
flags = ACL_START_NO_FLUSH;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue