summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2017-11-22 15:03:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-24 11:00:22 +0100
commitdadb6c1a8d889b5cab5ff6ed44db9cdb445467e7 (patch)
treeb4e7cef4b6a46599f7f8e0baaf4a29203ca44d8c /drivers/bluetooth
parentf37dc00bace9e9deb2c3db35fc7bf815dbf0c913 (diff)
downloadlinux-stable-dadb6c1a8d889b5cab5ff6ed44db9cdb445467e7.tar.gz
linux-stable-dadb6c1a8d889b5cab5ff6ed44db9cdb445467e7.tar.bz2
linux-stable-dadb6c1a8d889b5cab5ff6ed44db9cdb445467e7.zip
Bluetooth: btqcomsmd: Fix skb double free corruption
[ Upstream commit 67b8fbead4685b36d290a0ef91c6ddffc4920ec9 ] In case of hci send frame failure, skb is still owned by the caller (hci_core) and then should not be freed. This fixes crash on dragonboard-410c when sending SCO packet. skb is freed by both btqcomsmd and hci_core. Fixes: 1511cc750c3d ("Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver") Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btqcomsmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bluetooth/btqcomsmd.c b/drivers/bluetooth/btqcomsmd.c
index 08c2c93887c1..3aac78a5091b 100644
--- a/drivers/bluetooth/btqcomsmd.c
+++ b/drivers/bluetooth/btqcomsmd.c
@@ -85,7 +85,8 @@ static int btqcomsmd_send(struct hci_dev *hdev, struct sk_buff *skb)
break;
}
- kfree_skb(skb);
+ if (!ret)
+ kfree_skb(skb);
return ret;
}