Skip to content

Commit 2b0f2fc

Browse files
committed
Bluetooth: hci_conn: Use disable_delayed_work_sync
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: [email protected] Tested-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=2446dd3cb07277388db6 Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent a94bc93 commit 2b0f2fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/bluetooth/hci_conn.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,9 +1127,9 @@ void hci_conn_del(struct hci_conn *conn)
11271127

11281128
hci_conn_unlink(conn);
11291129

1130-
cancel_delayed_work_sync(&conn->disc_work);
1131-
cancel_delayed_work_sync(&conn->auto_accept_work);
1132-
cancel_delayed_work_sync(&conn->idle_work);
1130+
disable_delayed_work_sync(&conn->disc_work);
1131+
disable_delayed_work_sync(&conn->auto_accept_work);
1132+
disable_delayed_work_sync(&conn->idle_work);
11331133

11341134
if (conn->type == ACL_LINK) {
11351135
/* Unacked frames */

0 commit comments

Comments
 (0)