linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Bluetooth patches
@ 2012-07-19 14:03 Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 1/8] Bluetooth: mgmt: Managing only BR/EDR HCI controllers Andrei Emeltchenko
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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

Set of patches from my RFCs which are ready to be applied (IMO :)

Andrei Emeltchenko (8):
  Bluetooth: mgmt: Managing only BR/EDR HCI controllers
  Bluetooth: debug: Fix printing A2MP cmd code format
  Bluetooth: debug: Fix printing refcnt for hci_conn
  Bluetooth: smp: Fix possible NULL dereference
  Bluetooth: trivial: Fix mixing spaces and tabs in smp
  Bluetooth: Define AMP controller statuses
  Bluetooth: Do not shadow hdr variable
  Bluetooth: Fix processing A2MP chan in security_cfm

 include/net/bluetooth/hci.h      |    9 +++++++++
 include/net/bluetooth/hci_core.h |    8 +++-----
 include/net/bluetooth/smp.h      |    8 ++++----
 net/bluetooth/a2mp.c             |   14 +++++++++-----
 net/bluetooth/hci_core.c         |    6 ++++--
 net/bluetooth/l2cap_core.c       |    5 +++++
 net/bluetooth/mgmt.c             |   20 ++++++++++++++++++--
 net/bluetooth/smp.c              |    5 ++++-
 8 files changed, 56 insertions(+), 19 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/8] Bluetooth: mgmt: Managing only BR/EDR HCI controllers
  2012-07-19 14:03 [PATCH 0/8] Bluetooth patches Andrei Emeltchenko
@ 2012-07-19 14:03 ` Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 2/8] Bluetooth: debug: Fix printing A2MP cmd code format Andrei Emeltchenko
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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

Add check that HCI controller is BR/EDR. AMP controller shall not be
managed by mgmt interface and consequently user space.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
---
 include/net/bluetooth/hci_core.h |    2 +-
 net/bluetooth/hci_core.c         |    6 ++++--
 net/bluetooth/mgmt.c             |   20 ++++++++++++++++++--
 3 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 475b8c0..cda6437 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1056,7 +1056,7 @@ int mgmt_discovering(struct hci_dev *hdev, u8 discovering);
 int mgmt_interleaved_discovery(struct hci_dev *hdev);
 int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
 int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
-
+bool mgmt_valid_hdev(struct hci_dev *hdev);
 int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent);
 
 /* HCI info for socket */
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 1d28d81..28bab9d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -696,7 +696,8 @@ int hci_dev_open(__u16 dev)
 		hci_dev_hold(hdev);
 		set_bit(HCI_UP, &hdev->flags);
 		hci_notify(hdev, HCI_DEV_UP);
-		if (!test_bit(HCI_SETUP, &hdev->dev_flags)) {
+		if (!test_bit(HCI_SETUP, &hdev->dev_flags) &&
+		    mgmt_valid_hdev(hdev)) {
 			hci_dev_lock(hdev);
 			mgmt_powered(hdev, 1);
 			hci_dev_unlock(hdev);
@@ -797,7 +798,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
 	 * and no tasks are scheduled. */
 	hdev->close(hdev);
 
-	if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags)) {
+	if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags) &&
+	    mgmt_valid_hdev(hdev)) {
 		hci_dev_lock(hdev);
 		mgmt_powered(hdev, 0);
 		hci_dev_unlock(hdev);
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index ad6613d..2a0f695 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -193,6 +193,11 @@ static u8 mgmt_status_table[] = {
 	MGMT_STATUS_CONNECT_FAILED,	/* MAC Connection Failed */
 };
 
+bool mgmt_valid_hdev(struct hci_dev *hdev)
+{
+	return hdev->dev_type == HCI_BREDR;
+}
+
 static u8 mgmt_status(u8 hci_status)
 {
 	if (hci_status < ARRAY_SIZE(mgmt_status_table))
@@ -317,7 +322,6 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
 			   u16 data_len)
 {
 	struct mgmt_rp_read_index_list *rp;
-	struct list_head *p;
 	struct hci_dev *d;
 	size_t rp_len;
 	u16 count;
@@ -328,7 +332,10 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
 	read_lock(&hci_dev_list_lock);
 
 	count = 0;
-	list_for_each(p, &hci_dev_list) {
+	list_for_each_entry(d, &hci_dev_list, list) {
+		if (!mgmt_valid_hdev(d))
+			continue;
+
 		count++;
 	}
 
@@ -346,6 +353,9 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
 		if (test_bit(HCI_SETUP, &d->dev_flags))
 			continue;
 
+		if (!mgmt_valid_hdev(d))
+			continue;
+
 		rp->index[i++] = cpu_to_le16(d->id);
 		BT_DBG("Added hci%u", d->id);
 	}
@@ -2820,6 +2830,9 @@ static void cmd_status_rsp(struct pending_cmd *cmd, void *data)
 
 int mgmt_index_added(struct hci_dev *hdev)
 {
+	if (!mgmt_valid_hdev(hdev))
+		return -ENOTSUPP;
+
 	return mgmt_event(MGMT_EV_INDEX_ADDED, hdev, NULL, 0, NULL);
 }
 
@@ -2827,6 +2840,9 @@ int mgmt_index_removed(struct hci_dev *hdev)
 {
 	u8 status = MGMT_STATUS_INVALID_INDEX;
 
+	if (!mgmt_valid_hdev(hdev))
+		return -ENOTSUPP;
+
 	mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status);
 
 	return mgmt_event(MGMT_EV_INDEX_REMOVED, hdev, NULL, 0, NULL);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/8] Bluetooth: debug: Fix printing A2MP cmd code format
  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 ` Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 3/8] Bluetooth: debug: Fix printing refcnt for hci_conn Andrei Emeltchenko
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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

Print A2MP code format according to Bluetooth style.

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

diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index bc28c21..179a6b6 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -316,7 +316,7 @@ send_rsp:
 static inline int a2mp_cmd_rsp(struct amp_mgr *mgr, struct sk_buff *skb,
 			       struct a2mp_cmd *hdr)
 {
-	BT_DBG("ident %d code %d", hdr->ident, hdr->code);
+	BT_DBG("ident %d code 0x%2.2x", hdr->ident, hdr->code);
 
 	skb_pull(skb, le16_to_cpu(hdr->len));
 	return 0;
@@ -335,7 +335,7 @@ static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
 		struct a2mp_cmd *hdr = (void *) skb->data;
 		u16 len = le16_to_cpu(hdr->len);
 
-		BT_DBG("code 0x%02x id %d len %d", hdr->code, hdr->ident, len);
+		BT_DBG("code 0x%2.2x id %d len %u", hdr->code, hdr->ident, len);
 
 		skb_pull(skb, sizeof(*hdr));
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/8] Bluetooth: debug: Fix printing refcnt for hci_conn
  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 ` Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 4/8] Bluetooth: smp: Fix possible NULL dereference Andrei Emeltchenko
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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

Use the same style for refcnt printing through all Bluetooth code
taking the reference the l2cap_chan refcnt printing.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 include/net/bluetooth/hci_core.h |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index cda6437..13b102b 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -587,8 +587,7 @@ void hci_conn_put_device(struct hci_conn *conn);
 
 static inline void hci_conn_hold(struct hci_conn *conn)
 {
-	BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt),
-	       atomic_read(&conn->refcnt) + 1);
+	BT_DBG("hcon %p orig refcnt %d", conn, atomic_read(&conn->refcnt));
 
 	atomic_inc(&conn->refcnt);
 	cancel_delayed_work(&conn->disc_work);
@@ -596,8 +595,7 @@ static inline void hci_conn_hold(struct hci_conn *conn)
 
 static inline void hci_conn_put(struct hci_conn *conn)
 {
-	BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt),
-	       atomic_read(&conn->refcnt) - 1);
+	BT_DBG("hcon %p orig refcnt %d", conn, atomic_read(&conn->refcnt));
 
 	if (atomic_dec_and_test(&conn->refcnt)) {
 		unsigned long timeo;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/8] Bluetooth: smp: Fix possible NULL dereference
  2012-07-19 14:03 [PATCH 0/8] Bluetooth patches Andrei Emeltchenko
                   ` (2 preceding siblings ...)
  2012-07-19 14:03 ` [PATCH 3/8] Bluetooth: debug: Fix printing refcnt for hci_conn Andrei Emeltchenko
@ 2012-07-19 14:03 ` Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 5/8] Bluetooth: trivial: Fix mixing spaces and tabs in smp Andrei Emeltchenko
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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

smp_chan_create might return NULL so we need to check before
dereferencing smp.

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

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 5bb5b51..1104c5a 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -578,8 +578,11 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
 
 	if (!test_and_set_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags))
 		smp = smp_chan_create(conn);
+	else
+		smp = conn->smp_chan;
 
-	smp = conn->smp_chan;
+	if (!smp)
+		return SMP_UNSPECIFIED;
 
 	smp->preq[0] = SMP_CMD_PAIRING_REQ;
 	memcpy(&smp->preq[1], req, sizeof(*req));
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/8] Bluetooth: trivial: Fix mixing spaces and tabs in smp
  2012-07-19 14:03 [PATCH 0/8] Bluetooth patches Andrei Emeltchenko
                   ` (3 preceding siblings ...)
  2012-07-19 14:03 ` [PATCH 4/8] Bluetooth: smp: Fix possible NULL dereference Andrei Emeltchenko
@ 2012-07-19 14:03 ` Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 6/8] Bluetooth: Define AMP controller statuses Andrei Emeltchenko
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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

Change spaces to tabs in smp code

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 include/net/bluetooth/smp.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h
index ca356a7..50993a5 100644
--- a/include/net/bluetooth/smp.h
+++ b/include/net/bluetooth/smp.h
@@ -108,8 +108,8 @@ struct smp_cmd_security_req {
 #define SMP_CONFIRM_FAILED		0x04
 #define SMP_PAIRING_NOTSUPP		0x05
 #define SMP_ENC_KEY_SIZE		0x06
-#define SMP_CMD_NOTSUPP		0x07
-#define SMP_UNSPECIFIED		0x08
+#define SMP_CMD_NOTSUPP			0x07
+#define SMP_UNSPECIFIED			0x08
 #define SMP_REPEATED_ATTEMPTS		0x09
 
 #define SMP_MIN_ENC_KEY_SIZE		7
@@ -123,8 +123,8 @@ struct smp_chan {
 	struct l2cap_conn *conn;
 	u8		preq[7]; /* SMP Pairing Request */
 	u8		prsp[7]; /* SMP Pairing Response */
-	u8              prnd[16]; /* SMP Pairing Random (local) */
-	u8              rrnd[16]; /* SMP Pairing Random (remote) */
+	u8		prnd[16]; /* SMP Pairing Random (local) */
+	u8		rrnd[16]; /* SMP Pairing Random (remote) */
 	u8		pcnf[16]; /* SMP Pairing Confirm */
 	u8		tk[16]; /* SMP Temporary Key */
 	u8		enc_key_size;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/8] Bluetooth: Define AMP controller statuses
  2012-07-19 14:03 [PATCH 0/8] Bluetooth patches Andrei Emeltchenko
                   ` (4 preceding siblings ...)
  2012-07-19 14:03 ` [PATCH 5/8] Bluetooth: trivial: Fix mixing spaces and tabs in smp Andrei Emeltchenko
@ 2012-07-19 14:03 ` Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 7/8] Bluetooth: Do not shadow hdr variable Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 8/8] Bluetooth: Fix processing A2MP chan in security_cfm Andrei Emeltchenko
  7 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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

AMP status codes copied from Bluez patch sent by Peter Krystad
<pkrystad@codeaurora.org>.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 include/net/bluetooth/hci.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index ccd723e..7f19556 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -62,6 +62,15 @@
 /* First BR/EDR Controller shall have ID = 0 */
 #define HCI_BREDR_ID	0
 
+/* AMP controller status */
+#define AMP_CTRL_POWERED_DOWN			0x00
+#define AMP_CTRL_BLUETOOTH_ONLY			0x01
+#define AMP_CTRL_NO_CAPACITY			0x02
+#define AMP_CTRL_LOW_CAPACITY			0x03
+#define AMP_CTRL_MEDIUM_CAPACITY		0x04
+#define AMP_CTRL_HIGH_CAPACITY			0x05
+#define AMP_CTRL_FULL_CAPACITY			0x06
+
 /* HCI device quirks */
 enum {
 	HCI_QUIRK_RESET_ON_CLOSE,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/8] Bluetooth: Do not shadow hdr variable
  2012-07-19 14:03 [PATCH 0/8] Bluetooth patches Andrei Emeltchenko
                   ` (5 preceding siblings ...)
  2012-07-19 14:03 ` [PATCH 6/8] Bluetooth: Define AMP controller statuses Andrei Emeltchenko
@ 2012-07-19 14:03 ` Andrei Emeltchenko
  2012-07-19 14:03 ` [PATCH 8/8] Bluetooth: Fix processing A2MP chan in security_cfm Andrei Emeltchenko
  7 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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

Fix compile warnings below:

...
net/bluetooth/a2mp.c:505:33: warning: symbol 'hdr' shadows an earlier one
net/bluetooth/a2mp.c:498:25: originally declared here
...

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

diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index 179a6b6..c4732b1 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -325,15 +325,17 @@ static inline int a2mp_cmd_rsp(struct amp_mgr *mgr, struct sk_buff *skb,
 /* Handle A2MP signalling */
 static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
 {
-	struct a2mp_cmd *hdr = (void *) skb->data;
+	struct a2mp_cmd *hdr;
 	struct amp_mgr *mgr = chan->data;
 	int err = 0;
 
 	amp_mgr_get(mgr);
 
 	while (skb->len >= sizeof(*hdr)) {
-		struct a2mp_cmd *hdr = (void *) skb->data;
-		u16 len = le16_to_cpu(hdr->len);
+		u16 len;
+
+		hdr = (void *) skb->data;
+		len = le16_to_cpu(hdr->len);
 
 		BT_DBG("code 0x%2.2x id %d len %u", hdr->code, hdr->ident, len);
 
@@ -393,7 +395,9 @@ static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
 
 	if (err) {
 		struct a2mp_cmd_rej rej;
+
 		rej.reason = __constant_cpu_to_le16(0);
+		hdr = (void *) skb->data;
 
 		BT_DBG("Send A2MP Rej: cmd 0x%2.2x err %d", hdr->code, err);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/8] Bluetooth: Fix processing A2MP chan in security_cfm
  2012-07-19 14:03 [PATCH 0/8] Bluetooth patches Andrei Emeltchenko
                   ` (6 preceding siblings ...)
  2012-07-19 14:03 ` [PATCH 7/8] Bluetooth: Do not shadow hdr variable Andrei Emeltchenko
@ 2012-07-19 14:03 ` Andrei Emeltchenko
  2012-07-19 16:21   ` Gustavo Padovan
  7 siblings, 1 reply; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-19 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 8/8] Bluetooth: Fix processing A2MP chan in security_cfm
  2012-07-19 14:03 ` [PATCH 8/8] Bluetooth: Fix processing A2MP chan in security_cfm Andrei Emeltchenko
@ 2012-07-19 16:21   ` Gustavo Padovan
  0 siblings, 0 replies; 10+ messages in thread
From: Gustavo Padovan @ 2012-07-19 16:21 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-07-19 17:03:47 +0300]:

> 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(+)

All patches have been applied to bluetooth-next.git, but patch 4 that went to
bluetooth.git, thanks.

	Gustavo

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-07-19 16:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 8/8] Bluetooth: Fix processing A2MP chan in security_cfm Andrei Emeltchenko
2012-07-19 16:21   ` Gustavo Padovan

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).