From: Mat Martineau <mathewm@codeaurora.org>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCHv2] Bluetooth: Add refcnt to l2cap_conn
Date: Fri, 22 Jun 2012 15:09:08 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1206221423110.2543@mathewm-linux> (raw)
In-Reply-To: <1340288314-9814-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei -
On Thu, 21 Jun 2012, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> Adding kref to l2cap_conn helps to better handle racing when deleting
> l2cap_conn. Races are created when deleting conn from timeout and from
> the other execution path.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> include/net/bluetooth/l2cap.h | 6 ++
> net/bluetooth/l2cap_core.c | 128 +++++++++++++++++++++++++++++++++--------
> net/bluetooth/smp.c | 7 +--
> 3 files changed, 113 insertions(+), 28 deletions(-)
>
This v2 patch adds reference counting for the info timer. Are there
any other changes compared to v1?
I'm still concerned that this "reference counting" does not count
every reference. It only counts references used by the timers and in
l2cap_security_cfm. This is a fragile approach - as the code evolves,
it's not clear what the rules are for using reference counting with
l2cap_conn. I think the most maintainable and robust approach is to
make the rule "Count every reference" (including those in hci_conn and
l2cap_chan). What rules do you think are best for reference counting
in this case? It might be good to include that information in the
commit message or comments.
Regards,
--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next prev parent reply other threads:[~2012-06-22 22:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 14:22 [RFC] Bluetooth: Add refcnt to l2cap_conn Andrei Emeltchenko
2012-06-07 7:04 ` [PATCHv1] " Andrei Emeltchenko
2012-06-08 7:27 ` Andrei Emeltchenko
2012-06-08 16:54 ` Mat Martineau
2012-06-21 14:18 ` [PATCHv2] " Andrei Emeltchenko
2012-06-22 22:09 ` Mat Martineau [this message]
2012-06-25 7:53 ` Andrei Emeltchenko
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=alpine.DEB.2.02.1206221423110.2543@mathewm-linux \
--to=mathewm@codeaurora.org \
--cc=Andrei.Emeltchenko.news@gmail.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