From: Karl Relton <karllinuxtest.relton@ntlworld.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: hidp bug concerning ctrl_sk sock
Date: Tue, 11 Dec 2012 20:05:25 +0000 [thread overview]
Message-ID: <1355256325.6074.0.camel@dellpc> (raw)
In-Reply-To: <1354828992.3394.7.camel@dellpc>
On Thu, 2012-12-06 at 21:23 +0000, Karl Relton wrote:
> With reference to bug https://bugzilla.kernel.org/show_bug.cgi?id=50541
> it seems to me that the hidp driver has a problem in the hidp_session()
> function.
>
> The sock structure pointed to by ctrl_sk is being freed from under the
> functions feet (as far as I can see), causing this function to crash.
> Shouldn't a lock_sock or sock_hold be necessary to keep the sock
> structure around until hidp_session has finished with it?
>
>
A bit more testing, and a bit more accurate diagnosis to report. The
ctrl_sk is being orphaned in the l2cap bluetooth driver code. The
orphaning sets the sk_wq to null, leading to the OOPS in the
wait_event_timeout() call in hidp_session.
Is there some way of marking the sock as in use so that l2cap doesn't
orphan it straight away?
next prev parent reply other threads:[~2012-12-11 20:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 21:23 hidp bug concerning ctrl_sk sock Karl Relton
2012-12-11 20:05 ` Karl Relton [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-12-06 21:04 Karl Relton
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=1355256325.6074.0.camel@dellpc \
--to=karllinuxtest.relton@ntlworld.com \
--cc=linux-bluetooth@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).