]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: ISO: free rx_skb if not consumed
authorPauli Virtanen <pav@iki.fi>
Mon, 22 Sep 2025 18:11:21 +0000 (21:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 10:00:18 +0000 (12:00 +0200)
[ Upstream commit 6ba85da5804efffe15c89b03742ea868f20b4172 ]

If iso_conn is freed when RX is incomplete, free any leftover skb piece.

Fixes: dc26097bdb86 ("Bluetooth: ISO: Use kref to track lifetime of iso_conn")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/iso.c

index df21c79800fb671202eb40a0eb1bf7a95497993f..e38f52638627dbafad89884d45560269eb4047d8 100644 (file)
@@ -111,6 +111,8 @@ static void iso_conn_free(struct kref *ref)
        /* Ensure no more work items will run since hci_conn has been dropped */
        disable_delayed_work_sync(&conn->timeout_work);
 
+       kfree_skb(conn->rx_skb);
+
        kfree(conn);
 }