Skip to content

Commit 67b8fbe

Browse files
Loic Poulainholtmann
authored andcommitted
Bluetooth: btqcomsmd: Fix skb double free corruption
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: 1511cc7 ("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>
1 parent d73e172 commit 67b8fbe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/bluetooth/btqcomsmd.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ static int btqcomsmd_send(struct hci_dev *hdev, struct sk_buff *skb)
8888
break;
8989
}
9090

91-
kfree_skb(skb);
91+
if (!ret)
92+
kfree_skb(skb);
9293

9394
return ret;
9495
}

0 commit comments

Comments
 (0)