From: syzbot <syzbot+b9cff96f1ca33356d180@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [bluetooth?] general protection fault in qca_close
Date: Thu, 06 Feb 2025 18:38:05 -0800 [thread overview]
Message-ID: <67a5720d.050a0220.2b1e6.0007.GAE@google.com> (raw)
In-Reply-To: <67a4b4c3.050a0220.264083.0006.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [syzbot] [bluetooth?] general protection fault in qca_close
Author: lizhi.xu@windriver.com
if hci register device lose than clear HCI_UART_PROTO_READY bit.
And move closer set bit HCI_UART_PROTO_READY to hci_register_dev, make the window smaller.
#syz test
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index b955dc96b483..d5b97ff59330 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -683,8 +683,10 @@ static int hci_uart_register_dev(struct hci_uart *hu)
if (test_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
return 0;
+ set_bit(HCI_UART_PROTO_READY, &hu->flags);
if (hci_register_dev(hdev) < 0) {
BT_ERR("Can't register HCI device");
+ clear_bit(HCI_UART_PROTO_READY, &hu->flags);
hu->proto->close(hu);
hu->hdev = NULL;
hci_free_dev(hdev);
@@ -707,8 +709,6 @@ static int hci_uart_set_proto(struct hci_uart *hu, int id)
hu->proto = p;
- set_bit(HCI_UART_PROTO_READY, &hu->flags);
-
err = hci_uart_register_dev(hu);
if (err) {
return err;
next prev parent reply other threads:[~2025-02-07 2:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 13:10 [syzbot] [bluetooth?] general protection fault in qca_close syzbot
2025-02-07 2:38 ` syzbot [this message]
2025-02-07 3:55 ` [PATCH] Bluetooth: hci_ldisc: Clear and shrink the ready bit Lizhi Xu
2025-02-07 4:34 ` bluez.test.bot
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=67a5720d.050a0220.2b1e6.0007.GAE@google.com \
--to=syzbot+b9cff96f1ca33356d180@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.