From: Greg KH <greg@kroah.com>
To: Coiby Xu <coiby.xu@gmail.com>
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
"open list:NETWORKING \[GENERAL\]" <netdev@vger.kernel.org>,
Marcel Holtmann <marcel@holtmann.org>,
open list <linux-kernel@vger.kernel.org>,
linux-bluetooth@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
syzbot+fadfba6a911f6bf71842@syzkaller.appspotmail.com,
linux-kernel-mentees@lists.linuxfoundation.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Linux-kernel-mentees] [PATCH] Bluetooth: Initialize the TX queue lock when creating struct l2cap_chan in 6LOWPAN
Date: Tue, 4 Aug 2020 11:42:53 +0200 [thread overview]
Message-ID: <20200804094253.GA2667430@kroah.com> (raw)
In-Reply-To: <20200804093937.772961-1-coiby.xu@gmail.com>
On Tue, Aug 04, 2020 at 05:39:37PM +0800, Coiby Xu wrote:
> When L2CAP channel is destroyed by hci_unregister_dev, it will
> acquire the spin lock of the (struct l2cap_chan *)->tx_q list to
> delete all the buffers. But sometimes when hci_unregister_dev is
> being called, this lock may have not bee initialized. Initialize
> the TX queue lock when creating struct l2cap_chan in 6LOWPAN to fix
> this problem.
>
> Reported-by: syzbot+fadfba6a911f6bf71842@syzkaller.appspotmail.com
> Link: https://syzkaller.appspot.com/bug?extid=fadfba6a911f6bf71842
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
> ---
> net/bluetooth/6lowpan.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
> index bb55d92691b0..713c618a73df 100644
> --- a/net/bluetooth/6lowpan.c
> +++ b/net/bluetooth/6lowpan.c
> @@ -651,6 +651,7 @@ static struct l2cap_chan *chan_create(void)
>
> l2cap_chan_set_defaults(chan);
>
> + skb_queue_head_init(&chan->tx_q);
> chan->chan_type = L2CAP_CHAN_CONN_ORIENTED;
> chan->mode = L2CAP_MODE_LE_FLOWCTL;
> chan->imtu = 1280;
Nice, did syzbot verify that this resolves the issue?
thanks,
greg k-h
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next prev parent reply other threads:[~2020-08-04 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 9:39 [Linux-kernel-mentees] [PATCH] Bluetooth: Initialize the TX queue lock when creating struct l2cap_chan in 6LOWPAN Coiby Xu
2020-08-04 9:42 ` Greg KH [this message]
2020-08-04 10:41 ` Coiby Xu
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=20200804094253.GA2667430@kroah.com \
--to=greg@kroah.com \
--cc=coiby.xu@gmail.com \
--cc=davem@davemloft.net \
--cc=johan.hedberg@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=syzbot+fadfba6a911f6bf71842@syzkaller.appspotmail.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;
as well as URLs for NNTP newsgroup(s).