From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58EF7C433E1 for ; Tue, 4 Aug 2020 09:43:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5ED682086A for ; Tue, 4 Aug 2020 09:43:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="nAtgpS7L"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="efU+VnGc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbgHDJnO (ORCPT ); Tue, 4 Aug 2020 05:43:14 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:56981 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbgHDJnO (ORCPT ); Tue, 4 Aug 2020 05:43:14 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0BC6B5C0200; Tue, 4 Aug 2020 05:43:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 04 Aug 2020 05:43:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=cjBmqIM9+5mv2uiP07cYDoPaonT iqBxD1XI04vEZs68=; b=nAtgpS7LWMG6/2CgXZn0XgBEo6SGNf+0Zmx5YLC5lL0 bOPCXbcOONVwb9ClrSXuAz3AeQ7R0tfCr5bpkVCfx1du1sPga3uoFh58mpwuoq3J uH7Mss1O/rqWwulrZFXlfkemagThxzbJkm5W4klZRUQUZmlAPKSV/gIPvcWpRdMM f9mVKNsdiopykUjx/QEBrpWhdF2VlIfNoiiFaFqO/BlxwNtL8uTTtKfI20CPGIun Fys7cxmLZ4SbgHuQFDBoYYWK/tz6MW0qCJyeYOWdFNArEeKqy9hKaQua+3vJbCjr VTfkVE5CuSRqzM55v9VxVRDxboR5wfvY2ULpsfOKuKA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=cjBmqI M9+5mv2uiP07cYDoPaonTiqBxD1XI04vEZs68=; b=efU+VnGc/SEcIFLkan12oR 6ey8zxF5TlXEi9+e2D9/pdQECvxXRT04hGehE6xKVxJZRdusFuFNswe6JgqCgVO3 pN0RwNn2j1yggX3kMx1+BNiX0GKxo3qWTs6MFZD8iCxpXZbAWc3hSFyAKIWjU64N 8WPoX7HQzhevn2OuK4eNRTgQLLXXznnYeRpruwSDz8gTSSI0BJQA8P9MbIR/omWV 479PXZhxsYdjp5YYTmsVUX+6KZ1IQT9UKoYstHu8cT2alLr0XQ5Vz+IBiVgOiH9j pqygEDDcz5Qx8v3VjtSwzdUpwcwgSPs1JvCN+MnRxxGwPkIFyeDr/tSjJsSdAHLg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrjeeigddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpeffhffvuffkfhggtggujges thdtredttddtvdenucfhrhhomhepifhrvghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtg homheqnecuggftrfgrthhtvghrnhepfeefteeuhfffleehvddtleejudekiedthfejjedt tdetkefgledtvdejgfeuteefnecuffhomhgrihhnpegrphhpshhpohhtrdgtohhmnecukf hppeekfedrkeeirdekledruddtjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 2741930600A3; Tue, 4 Aug 2020 05:43:12 -0400 (EDT) Date: Tue, 4 Aug 2020 11:42:53 +0200 From: Greg KH To: Coiby Xu Cc: linux-bluetooth@vger.kernel.org, Johan Hedberg , "open list:NETWORKING [GENERAL]" , Marcel Holtmann , open list , Jakub Kicinski , syzbot+fadfba6a911f6bf71842@syzkaller.appspotmail.com, linux-kernel-mentees@lists.linuxfoundation.org, "David S. Miller" Subject: Re: [Linux-kernel-mentees] [PATCH] Bluetooth: Initialize the TX queue lock when creating struct l2cap_chan in 6LOWPAN Message-ID: <20200804094253.GA2667430@kroah.com> References: <20200804093937.772961-1-coiby.xu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200804093937.772961-1-coiby.xu@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 > --- > 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