]> www.infradead.org Git - users/willy/pagecache.git/commit
Bluetooth: SCO: fix sco_conn refcounting on sco_conn_ready
authorPauli Virtanen <pav@iki.fi>
Thu, 27 Feb 2025 21:28:15 +0000 (23:28 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 7 Mar 2025 17:43:29 +0000 (12:43 -0500)
commit8d74c9106be8da051b22f0cd81e665f17d51ba5d
treeeeca47adc04f7d24aad88c8368cbf9263b851b63
parent75ddcd5ad40ecd9fbc9f5a7a2ed0e1e74921db3c
Bluetooth: SCO: fix sco_conn refcounting on sco_conn_ready

sco_conn refcount shall not be incremented a second time if the sk
already owns the refcount, so hold only when adding new chan.

Add sco_conn_hold() for clarity, as refcnt is never zero here due to the
sco_conn_add().

Fixes SCO socket shutdown not actually closing the SCO connection.

Fixes: ed9588554943 ("Bluetooth: SCO: remove the redundant sco_conn_put")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/sco.c