From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+d6282a21a27259b5f7e7@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bluetooth?] WARNING in hci_conn_set_handle
Date: Sun, 14 Apr 2024 16:30:44 +0800 [thread overview]
Message-ID: <20240414083044.2191-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000ec64cd0616084ae9@google.com>
On Sat, 13 Apr 2024 23:05:32 -0700
> syzbot found the following issue on:
>
> HEAD commit: 480e035fc4c7 Merge tag 'drm-next-2024-03-13' of https://gi..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=162d4723180000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 480e035fc4c7
--- x/net/bluetooth/hci_event.c
+++ y/net/bluetooth/hci_event.c
@@ -6902,7 +6902,7 @@ static void hci_le_create_big_complete_e
struct sk_buff *skb)
{
struct hci_evt_le_create_big_complete *ev = data;
- struct hci_conn *conn;
+ struct hci_conn *conn, *next;
__u8 i = 0;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
@@ -6912,38 +6912,29 @@ static void hci_le_create_big_complete_e
return;
hci_dev_lock(hdev);
- rcu_read_lock();
-
/* Connect all BISes that are bound to the BIG */
- list_for_each_entry_rcu(conn, &hdev->conn_hash.list, list) {
+ list_for_each_entry_safe(conn, next, &hdev->conn_hash.list, list) {
if (bacmp(&conn->dst, BDADDR_ANY) ||
conn->type != ISO_LINK ||
conn->iso_qos.bcast.big != ev->handle)
continue;
- if (hci_conn_set_handle(conn,
- __le16_to_cpu(ev->bis_handle[i++])))
+ if (hci_conn_set_handle(conn, __le16_to_cpu(ev->bis_handle[i++])))
continue;
if (!ev->status) {
conn->state = BT_CONNECTED;
set_bit(HCI_CONN_BIG_CREATED, &conn->flags);
- rcu_read_unlock();
hci_debugfs_create_conn(conn);
hci_conn_add_sysfs(conn);
hci_iso_setup_path(conn);
- rcu_read_lock();
continue;
}
hci_connect_cfm(conn, ev->status);
- rcu_read_unlock();
hci_conn_del(conn);
- rcu_read_lock();
}
- rcu_read_unlock();
-
if (!ev->status && !i)
/* If no BISes have been connected for the BIG,
* terminate. This is in case all bound connections
@@ -6952,7 +6943,6 @@ static void hci_le_create_big_complete_e
*/
hci_cmd_sync_queue(hdev, hci_iso_term_big_sync,
UINT_PTR(ev->handle), NULL);
-
hci_dev_unlock(hdev);
}
--
next prev parent reply other threads:[~2024-04-14 8:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-14 6:05 syzbot
2024-04-14 8:30 ` Hillf Danton [this message]
2024-04-14 8:58 ` syzbot
2024-04-15 9:33 ` [syzbot] test syzbot
2024-07-25 23:45 ` [syzbot] [bluetooth?] WARNING in hci_conn_set_handle syzbot
[not found] <CA+LQOUczHtC_3cxUFbkcpWYwLCr62k229ym9B3NL6RS6NQHdhw@mail.gmail.com>
2024-04-15 13:07 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240414083044.2191-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+d6282a21a27259b5f7e7@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome