From: Gustavo Padovan <gustavo@padovan.org>
To: Minho Ban <mhban@samsung.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC/PATCH] Bluetooth: prevent double l2cap_chan_destroy
Date: Mon, 21 May 2012 13:21:37 -0300 [thread overview]
Message-ID: <20120521162137.GE16942@joana> (raw)
In-Reply-To: <4FB992C8.8090105@samsung.com>
Hi Minho,
* Minho Ban <mhban@samsung.com> [2012-05-21 09:56:40 +0900]:
> l2cap_sock_kill can be called in l2cap_sock_release and l2cap_sock_close_cb
> either. This lead l2cap_chan_destroy to be called twice for same channel.
> To prevent double list_del and double chan_put, chan_destroy should be protected
> with chan->refcnt and chan_list_lock so that reentrance could be forbidden.
Even if l2cap_sock_kill() is called twice it will call l2cap_chan_destroy()
only once. If this is not happening we just have a broken piece of code
somewhere else and not here.
Gustavo
next prev parent reply other threads:[~2012-05-21 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 0:56 [RFC/PATCH] Bluetooth: prevent double l2cap_chan_destroy Minho Ban
2012-05-21 16:21 ` Gustavo Padovan [this message]
2012-05-22 2:50 ` Minho Ban
2012-05-22 12:23 ` Chanyeol Park
2012-05-23 1:39 ` Minho Ban
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=20120521162137.GE16942@joana \
--to=gustavo@padovan.org \
--cc=davem@davemloft.net \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mhban@samsung.com \
--cc=netdev@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).