From: "Daryl Van Vorst" <daryl@wideray.com>
To: "'Marcel Holtmann'" <marcel@holtmann.org>
Cc: "'BlueZ Mailing List'" <bluez-devel@lists.sourceforge.net>
Subject: RE: [Bluez-devel] Rfcomm use count
Date: Tue, 14 Sep 2004 14:58:57 -0700 [thread overview]
Message-ID: <000f01c49aa6$0958f510$1a01010a@baked> (raw)
In-Reply-To: <1095153493.5695.129.camel@pegasus>
Marcel,
That didn't work, but I think I found the problem. Not sure what the =
correct
solution is though.
Rfcomm_sock_cleanup_listen() calls bluez_accept_dequeue() in a loop =
until
bluez_accept_dequeue() has no more sockets to return. For each socket =
that
bluez_accept_dequeue() returns, rfcomm_sock_cleanup_listen() closes and
kills it. Killing it unlinks it from rfcomm_sk_list.
But if the socket is already closed (sk->state =3D=3D BT_CLOSED), then
bluez_accept_dequeue() does not return the socket (it just continues to =
the
next one in the queue). Bluez_accept_dequeue() does unlink it from the
accept queue, but not from rfcomm_sk_list.
I suppose the first question is: Is the bug in cleanup/dequeue, or is =
the
bug elsewhere (i.e.: things shouldn't ever be in quite that state when
cleanup_listen is called)?
Also, should rfcomm_sock_destruct() be called to decrement the use =
count?
-Daryl.
> -----Original Message-----
> From: Marcel Holtmann [mailto:marcel@holtmann.org]=20
> Sent: September 14, 2004 2:18 AM
> To: Daryl Van Vorst
> Cc: 'BlueZ Mailing List'
> Subject: RE: [Bluez-devel] Rfcomm use count
>=20
>=20
> Hi Daryl,
>=20
> > I just noticed that bluez_accept_unlink() was called with a=20
> socked that was
> > in state BT_CLOSED, so it can't be the second if(). It=20
> would have been
> > called from the first if().
> >=20
> > Clearly, I'm on glue.
> >=20
> > Still, does the order of bluez_accept_unlink() and=20
> sock_release() matter?
>=20
> I haven't done a full audit yet, but try to switch the order and see
> what happens. From a first look at it it makes sense to only=20
> release the
> socket when all the work is done, because otherwise=20
> lock_sock() makes no
> sense.
>=20
> Regards
>=20
> Marcel
>=20
>=20
>=20
next prev parent reply other threads:[~2004-09-14 21:58 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-13 19:06 [Bluez-devel] Rfcomm use count Daryl Van Vorst
2004-09-13 20:48 ` Daryl Van Vorst
2004-09-13 23:54 ` Daryl Van Vorst
2004-09-14 9:18 ` Marcel Holtmann
2004-09-14 21:58 ` Daryl Van Vorst [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-09-17 0:10 [Bluez-devel] Rfcomm Use Count Daryl Van Vorst
2004-09-17 8:58 ` Marcel Holtmann
2004-09-20 17:58 ` Daryl Van Vorst
2004-09-20 18:32 ` Marcel Holtmann
2004-09-20 18:52 ` Daryl Van Vorst
2004-09-20 19:48 ` Marcel Holtmann
2004-09-20 20:52 ` Daryl Van Vorst
2004-09-20 18:37 ` Daryl Van Vorst
2004-09-20 19:50 ` Marcel Holtmann
2004-09-20 20:11 ` Daryl Van Vorst
2004-09-20 20:34 ` Marcel Holtmann
2004-09-20 21:03 ` Daryl Van Vorst
2004-09-20 21:28 ` Marcel Holtmann
2004-09-20 22:38 ` Daryl Van Vorst
2004-09-20 23:33 ` Marcel Holtmann
2004-09-21 20:14 ` Daryl Van Vorst
2004-09-21 20:32 ` Marcel Holtmann
2004-09-21 20:39 ` Daryl Van Vorst
2004-09-21 21:26 ` Daryl Van Vorst
2004-09-21 22:07 ` Marcel Holtmann
2004-09-21 22:26 ` Marcel Holtmann
2004-09-21 22:44 ` Daryl Van Vorst
2004-09-22 11:08 ` Marcel Holtmann
2004-09-22 13:53 ` Marcel Holtmann
2004-09-22 17:57 ` Daryl Van Vorst
2004-09-22 18:12 ` Marcel Holtmann
2004-09-22 19:05 ` Daryl Van Vorst
2004-09-22 19:33 ` Marcel Holtmann
2004-09-22 19:52 ` Daryl Van Vorst
2004-09-22 19:57 ` Marcel Holtmann
2004-09-22 20:05 ` Daryl Van Vorst
[not found] ` <1096471423.20392.444.camel@igno>
2004-10-02 9:26 ` Marcel Holtmann
2004-08-31 22:09 [Bluez-devel] Rfcomm use count Daryl Van Vorst
2004-09-08 22:48 ` Daryl Van Vorst
2004-09-08 23:10 ` Daryl Van Vorst
2004-09-12 14:15 ` Marcel Holtmann
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='000f01c49aa6$0958f510$1a01010a@baked' \
--to=daryl@wideray.com \
--cc=bluez-devel@lists.sourceforge.net \
--cc=marcel@holtmann.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