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 <redacted>
---
net/bluetooth/6lowpan.c | 1 +
1 file changed, 1 insertion(+)
On Tue, Aug 04, 2020 at 05:39:37PM +0800, Coiby Xu wrote:
quoted hunk
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 <redacted>
---
net/bluetooth/6lowpan.c | 1 +
1 file changed, 1 insertion(+)
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:
quoted
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 <redacted>
---
net/bluetooth/6lowpan.c | 1 +
1 file changed, 1 insertion(+)
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
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees