* [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
* Re: [PATCH v1] Bluetooth: hci_conn: Use disable_delayed_work_sync
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
1 sibling, 1 reply; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2024-10-01 16:56 UTC (permalink / raw)
To: linux-bluetooth; +Cc: syzbot+2446dd3cb07277388db6
[-- Attachment #1: Type: text/plain, Size: 1486 bytes --]
On Tue, Oct 1, 2024 at 12:50 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> 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
>
#syz test
--
Luiz Augusto von Dentz
[-- Attachment #2: v1-0001-Bluetooth-hci_conn-Use-disable_delayed_work_sync.patch --]
[-- Type: text/x-patch, Size: 1377 bytes --]
From db0befd94b95e2607b950b09707a422622e27f59 Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue, 1 Oct 2024 12:34:06 -0400
Subject: [PATCH v1] 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: 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
* Re: [syzbot] [bluetooth?] WARNING in hci_conn_timeout
2024-10-01 16:56 ` Luiz Augusto von Dentz
@ 2024-10-01 17:22 ` syzbot
0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2024-10-01 17:22 UTC (permalink / raw)
To: linux-bluetooth, linux-kernel, luiz.dentz, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+2446dd3cb07277388db6@syzkaller.appspotmail.com
Tested-by: syzbot+2446dd3cb07277388db6@syzkaller.appspotmail.com
Tested on:
commit: e32cde8d Merge tag 'sched_ext-for-6.12-rc1-fixes-1' of..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14d28927980000
kernel config: https://syzkaller.appspot.com/x/.config?x=3fccdad3e2ebaa0c
dashboard link: https://syzkaller.appspot.com/bug?extid=2446dd3cb07277388db6
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=14060307980000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_conn: Use disable_delayed_work_sync
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 19:50 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2024-10-01 19:50 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 1 Oct 2024 12:50:55 -0400 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [v1] Bluetooth: hci_conn: Use disable_delayed_work_sync
https://git.kernel.org/bluetooth/bluetooth-next/c/6774cca543da
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [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