public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] Bluetooth: hci_conn: Use disable_delayed_work_sync
@ 2024-10-01 16:50 Luiz Augusto von Dentz
  2024-10-01 16:56 ` Luiz Augusto von Dentz
  2024-10-01 19:50 ` [PATCH v1] Bluetooth: hci_conn: Use disable_delayed_work_sync patchwork-bot+bluetooth
  0 siblings, 2 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2024-10-01 16:50 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes use of disable_delayed_work_sync instead
cancel_delayed_work_sync as it not only cancel the ongoing work but also
disables new submit which is disarable since the object holding the work
is about to be freed.

Reported-by: syzbot+2446dd3cb07277388db6@syzkaller.appspotmail.com
Closes: Reported-by: syzbot+2446dd3cb07277388db6@syzkaller.appspotmail.com
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/hci_conn.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 0c01ece500a9..fb0946eac8a4 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1124,9 +1124,9 @@ void hci_conn_del(struct hci_conn *conn)
 
 	hci_conn_unlink(conn);
 
-	cancel_delayed_work_sync(&conn->disc_work);
-	cancel_delayed_work_sync(&conn->auto_accept_work);
-	cancel_delayed_work_sync(&conn->idle_work);
+	disable_delayed_work_sync(&conn->disc_work);
+	disable_delayed_work_sync(&conn->auto_accept_work);
+	disable_delayed_work_sync(&conn->idle_work);
 
 	if (conn->type == ACL_LINK) {
 		/* Unacked frames */
-- 
2.46.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-01 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 16:50 [PATCH v1] Bluetooth: hci_conn: Use disable_delayed_work_sync Luiz Augusto von Dentz
2024-10-01 16:56 ` Luiz Augusto von Dentz
2024-10-01 17:22   ` [syzbot] [bluetooth?] WARNING in hci_conn_timeout syzbot
2024-10-01 19:50 ` [PATCH v1] Bluetooth: hci_conn: Use disable_delayed_work_sync patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox