Bluetooth: btqcomsmd: Fix skb double free corruption
authorLoic Poulain <loic.poulain@linaro.org>
Wed, 22 Nov 2017 14:03:17 +0000 (15:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:01:21 +0000 (11:01 +0100)
commite59e19dc4086ec79e259ac9841055863562baa20
tree5ad75c7a174abb2a6691a97cafb89b9178de5985
parent5b58533858e3f2d0b6d975d7725d8d04cb32b841
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>
drivers/bluetooth/btqcomsmd.c