]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: ISO: Use kref to track lifetime of iso_conn
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 1 Oct 2024 20:15:51 +0000 (16:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:53:27 +0000 (13:53 +0100)
commitf53e7489273dc2bb307bf50f319b3762d45534f0
tree76b0dc5c75bd03c966b6e9e1bd47749a4ddc4940
parentdf6614d6602d60a555d77fc6e2fcf27c679b97cc
Bluetooth: ISO: Use kref to track lifetime of iso_conn

[ Upstream commit dc26097bdb864a0d5955b9a25e43376ffc1af99b ]

This make use of kref to keep track of reference of iso_conn which
allows better tracking of its lifetime with usage of things like
kref_get_unless_zero in a similar way as used in l2cap_chan.

In addition to it remove call to iso_sock_set_timer on iso_sock_disconn
since at that point it is useless to set a timer as the sk will be freed
there is nothing to be done in iso_sock_timeout.

Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/iso.c