Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Check result code for l2cap info rsp
@ 2010-08-04  6:43 Ville Tervo
  2010-08-04 14:27 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Ville Tervo @ 2010-08-04  6:43 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: padovan, marcel, Ville Tervo

Check result code in l2cap information response. Othervise
the response code would read invalid feature mask and access
invalid memory.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
---
 net/bluetooth/l2cap.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 0f34e12..3e3cd9d 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3348,6 +3348,15 @@ static inline int l2cap_information_rsp(struct l2cap_conn *conn, struct l2cap_cm
 
 	del_timer(&conn->info_timer);
 
+	if (result != L2CAP_IR_SUCCESS) {
+		conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE;
+		conn->info_ident = 0;
+
+		l2cap_conn_start(conn);
+
+		return 0;
+	}
+
 	if (type == L2CAP_IT_FEAT_MASK) {
 		conn->feat_mask = get_unaligned_le32(rsp->data);
 
-- 
1.7.1

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

* Re: [PATCH] Bluetooth: Check result code for l2cap info rsp
  2010-08-04  6:43 [PATCH] Bluetooth: Check result code for l2cap info rsp Ville Tervo
@ 2010-08-04 14:27 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2010-08-04 14:27 UTC (permalink / raw)
  To: Ville Tervo; +Cc: linux-bluetooth, padovan

Hi Ville,

> Check result code in l2cap information response. Othervise
> the response code would read invalid feature mask and access
> invalid memory.
> 
> Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
> ---
>  net/bluetooth/l2cap.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)

patch has been applied. Thanks.

Regards

Marcel



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

end of thread, other threads:[~2010-08-04 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-04  6:43 [PATCH] Bluetooth: Check result code for l2cap info rsp Ville Tervo
2010-08-04 14:27 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox