From: Coiby Xu <coiby.xu@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: linux-bluetooth@vger.kernel.org,
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>,
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 18:41:48 +0800 [thread overview]
Message-ID: <20200804104148.nqxcy4f44uga7wjs@Rk> (raw)
In-Reply-To: <20200804094253.GA2667430@kroah.com>
On Tue, Aug 04, 2020 at 11:42:53AM +0200, Greg KH wrote:
>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
Yes. Thank you for reminding me. I'll also add an Tested-by: tag next time.
--
Best regards,
Coiby
prev parent reply other threads:[~2020-08-04 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 9:39 [PATCH] Bluetooth: Initialize the TX queue lock when creating struct l2cap_chan in 6LOWPAN Coiby Xu
2020-08-04 9:42 ` [Linux-kernel-mentees] " Greg KH
2020-08-04 10:41 ` Coiby Xu [this message]
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=20200804104148.nqxcy4f44uga7wjs@Rk \
--to=coiby.xu@gmail.com \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--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