From: Tedd Ho-Jeong An <tedd.an@intel.com>
To: "Jörg Otte" <jrg.otte@gmail.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"bluez mailin list (linux-bluetooth@vger.kernel.org)"
<linux-bluetooth@vger.kernel.org>,
inux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [4.1.0-07254-gc13c810] Regression: Bluetooth not working.
Date: Tue, 30 Jun 2015 11:47:26 -0700 [thread overview]
Message-ID: <20150630114726.1f21fbb6@tedd-fedora-vm> (raw)
In-Reply-To: <CADDKRnBoXfBLMQYqdnJfAahDxSai7FQqGojv5LhWoAGdSKQLzA@mail.gmail.com>
Hi Jörg
On Tue, 30 Jun 2015 16:58:13 +0200
Jörg Otte <jrg.otte@gmail.com> 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
prev parent reply other threads:[~2015-06-30 18:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 9:27 [4.1.0-07254-gc13c810] Regression: Bluetooth not working Jörg Otte
2015-06-26 9:37 ` Marcel Holtmann
2015-06-26 10:03 ` Jörg Otte
2015-06-26 10:27 ` Alexey Dobriyan
2015-06-26 14:28 ` Jörg Otte
2015-06-28 15:36 ` Jörg Otte
2015-06-28 16:09 ` Alexey Dobriyan
2015-06-29 9:00 ` Jörg Otte
2015-06-29 10:30 ` Alexey Dobriyan
2015-06-29 14:37 ` Jörg Otte
2015-06-29 21:13 ` Tedd Ho-Jeong An
2015-06-30 14:58 ` Jörg Otte
2015-06-30 18:47 ` Tedd Ho-Jeong An [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=20150630114726.1f21fbb6@tedd-fedora-vm \
--to=tedd.an@intel.com \
--cc=adobriyan@gmail.com \
--cc=johan.hedberg@gmail.com \
--cc=jrg.otte@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=torvalds@linux-foundation.org \
/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