]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: btusb: mediatek: Fix double free of skb in coredump
authorSean Wang <sean.wang@mediatek.com>
Wed, 17 Apr 2024 23:27:38 +0000 (16:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:32:37 +0000 (16:32 +0200)
commit80dfef128cb9f1b1ef67c0fe8c8deb4ea7ad30c1
treeb7cb6507c203f71466e7e8e437d0604312ddb6d2
parent882d614ac6bf666c5aae09947426ff6b3caf7b08
Bluetooth: btusb: mediatek: Fix double free of skb in coredump

[ Upstream commit 18bdb386a1a30e7a3d7732a98e45e69cf6b5710d ]

hci_devcd_append() would free the skb on error so the caller don't
have to free it again otherwise it would cause the double free of skb.

Fixes: 0b7015132878 ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support")
Reported-by : Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btmtk.c