Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753255AbbF3Srf (ORCPT ); Tue, 30 Jun 2015 14:47:35 -0400 Received: from mga14.intel.com ([192.55.52.115]:42374 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752352AbbF3Sr3 convert rfc822-to-8bit (ORCPT ); Tue, 30 Jun 2015 14:47:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,379,1432623600"; d="scan'208";a="516737917" Date: Tue, 30 Jun 2015 11:47:26 -0700 From: Tedd Ho-Jeong An To: =?UTF-8?B?SsO2cmc=?= Otte Cc: Alexey Dobriyan , Marcel Holtmann , Johan Hedberg , "bluez mailin list (linux-bluetooth@vger.kernel.org)" , inux Kernel Mailing List , Linus Torvalds Subject: Re: [4.1.0-07254-gc13c810] Regression: Bluetooth not working. Message-ID: <20150630114726.1f21fbb6@tedd-fedora-vm> In-Reply-To: References: <986DE56C-2E79-4CAD-9D32-89DAED9B449A@holtmann.org> <20150628160930.GA1663@p183.telecom.by> <20150629141341.667823f1@tedd-fedora-vm> Organization: Intel Corporation X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2184 Lines: 60 Hi Jörg On Tue, 30 Jun 2015 16:58:13 +0200 Jörg Otte wrote: > > Regarding the system hang issue, it looks like the problem is caused by the list_del(). > > According to the list.h, this macro puts the entry into invalid state and it causes the device hang in the l2cap_core.c > > > > /** > > * list_del - deletes entry from list. > > * @entry: the element to delete from the list. > > * Note: list_empty() on entry does not return true after this, the entry is > > * in an undefined state. > > */ > > > > So, one way to fix this issue is using the list_del_init() instead. > > > > Can you try this patch to see if it resolve the issue? No need to revert any patch. > > I ran a quick test with a different scenarios and it looks good to me so far. > > > > diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c > > index 51594fb..45fffa4 100644 > > --- a/net/bluetooth/l2cap_core.c > > +++ b/net/bluetooth/l2cap_core.c > > @@ -1634,7 +1634,7 @@ void l2cap_unregister_user(struct l2cap_conn *conn, struct l2cap_user *user) > > if (list_empty(&user->list)) > > goto out_unlock; > > > > - list_del(&user->list); > > + list_del_init(&user->list); > > user->remove(conn, user); > > > > out_unlock: > > @@ -1648,7 +1648,7 @@ static void l2cap_unregister_all_users(struct l2cap_conn *conn) > > > > while (!list_empty(&conn->users)) { > > user = list_first_entry(&conn->users, struct l2cap_user, list); > > - list_del(&user->list); > > + list_del_init(&user->list); > > user->remove(conn, user); > > } > > } > > > > Regards, > > Tedd Ho-Jeong An > > I now have both patche applied and no revert. Looks good so far. > > Thanks, Jörg Thanks for testing the patch. I submitted the patch just in case. Now, I am tossing the ball to Marcel. :) Regards, Tedd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/