From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org, luiz.dentz@gmail.com,
marcel@holtmann.org, syzkaller-bugs@googlegroups.com
Cc: syzbot <syzbot+f2725165900304ec97b6@syzkaller.appspotmail.com>
Subject: Re: [syzbot] INFO: trying to register non-static key in hci_uart_tty_receive (3)
Date: Sat, 23 Oct 2021 15:47:10 +0200 [thread overview]
Message-ID: <4202176.J8ZBFPDcmx@localhost.localdomain> (raw)
In-Reply-To: <000000000000162f5005cef9bbf7@google.com>
[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]
On Saturday, October 23, 2021 1:54:24 AM CEST syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 519d81956ee2 Linux 5.15-rc6
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=16787178b00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=1f7f46d98a0da80e
> dashboard link: https://syzkaller.appspot.com/bug?
extid=f2725165900304ec97b6
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils
for Debian) 2.35.2
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> IMPORTANT: if you fix the issue, please add the following tag to the
commit:
> Reported-by: syzbot+f2725165900304ec97b6@syzkaller.appspotmail.com
>
> INFO: trying to register non-static key.
> The code is fine but needs lockdep annotation, or maybe
> you didn't initialize this object before use?
> turning off the locking correctness validator.
Let's try the solution attached.
Fabio
#syz test
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
[-- Attachment #2: hci_ldisc.c.diff --]
[-- Type: text/x-patch, Size: 572 bytes --]
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 5ed2cfa7da1d..18b039c2f3cf 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -499,11 +499,11 @@ static int hci_uart_tty_open(struct tty_struct *tty)
hu->alignment = 1;
hu->padding = 0;
+ percpu_init_rwsem(&hu->proto_lock);
+
INIT_WORK(&hu->init_ready, hci_uart_init_work);
INIT_WORK(&hu->write_work, hci_uart_write_work);
- percpu_init_rwsem(&hu->proto_lock);
-
/* Flush any pending characters in the driver */
tty_driver_flush_buffer(tty);
next prev parent reply other threads:[~2021-10-23 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 23:54 [syzbot] INFO: trying to register non-static key in hci_uart_tty_receive (3) syzbot
2021-10-23 13:47 ` Fabio M. De Francesco [this message]
2021-10-23 13:47 ` 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=4202176.J8ZBFPDcmx@localhost.localdomain \
--to=fmdefrancesco@gmail.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=syzbot+f2725165900304ec97b6@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