linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 8/8] Bluetooth: Fix processing A2MP chan in security_cfm
Date: Thu, 19 Jul 2012 17:03:47 +0300	[thread overview]
Message-ID: <1342706627-19129-9-git-send-email-Andrei.Emeltchenko.news@gmail.com> (raw)
In-Reply-To: <1342706627-19129-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

Do not process A2MP channel in l2cap_security_cfm

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 net/bluetooth/l2cap_core.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index f2a8c75..ca7d5b2 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -5478,6 +5478,11 @@ int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
 		BT_DBG("chan %p scid 0x%4.4x state %s", chan, chan->scid,
 		       state_to_string(chan->state));
 
+		if (chan->chan_type == L2CAP_CHAN_CONN_FIX_A2MP) {
+			l2cap_chan_unlock(chan);
+			continue;
+		}
+
 		if (chan->scid == L2CAP_CID_LE_DATA) {
 			if (!status && encrypt) {
 				chan->sec_level = hcon->sec_level;
-- 
1.7.9.5


  parent reply	other threads:[~2012-07-19 14:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 14:03 [PATCH 0/8] Bluetooth patches Andrei Emeltchenko
2012-07-19 14:03 ` [PATCH 1/8] Bluetooth: mgmt: Managing only BR/EDR HCI controllers Andrei Emeltchenko
2012-07-19 14:03 ` [PATCH 2/8] Bluetooth: debug: Fix printing A2MP cmd code format Andrei Emeltchenko
2012-07-19 14:03 ` [PATCH 3/8] Bluetooth: debug: Fix printing refcnt for hci_conn Andrei Emeltchenko
2012-07-19 14:03 ` [PATCH 4/8] Bluetooth: smp: Fix possible NULL dereference Andrei Emeltchenko
2012-07-19 14:03 ` [PATCH 5/8] Bluetooth: trivial: Fix mixing spaces and tabs in smp Andrei Emeltchenko
2012-07-19 14:03 ` [PATCH 6/8] Bluetooth: Define AMP controller statuses Andrei Emeltchenko
2012-07-19 14:03 ` [PATCH 7/8] Bluetooth: Do not shadow hdr variable Andrei Emeltchenko
2012-07-19 14:03 ` Andrei Emeltchenko [this message]
2012-07-19 16:21   ` [PATCH 8/8] Bluetooth: Fix processing A2MP chan in security_cfm Gustavo Padovan

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=1342706627-19129-9-git-send-email-Andrei.Emeltchenko.news@gmail.com \
    --to=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;
as well as URLs for NNTP newsgroup(s).