From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org, gustavo@padovan.org, jprvita@profusion.mobi,
ulisses@profusion.mobi
Subject: [PATCH 3/7] Bluetooth: Fix crash when monitor timeout expires
Date: Wed, 14 Apr 2010 16:41:48 -0300 [thread overview]
Message-ID: <1271274112-7806-4-git-send-email-padovan@profusion.mobi> (raw)
In-Reply-To: <1271274112-7806-3-git-send-email-padovan@profusion.mobi>
The code was crashing due to a invalid access to hci_conn after the
channel disconnect.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi>
---
net/bluetooth/l2cap.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 657a411..b653039 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1547,6 +1547,9 @@ static struct sk_buff *l2cap_create_iframe_pdu(struct sock *sk, struct msghdr *m
BT_DBG("sk %p len %d", sk, (int)len);
+ if (!conn)
+ return ERR_PTR(-ENOTCONN);
+
if (sdulen)
hlen += 2;
--
1.6.4.4
next prev parent reply other threads:[~2010-04-14 19:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 19:41 More patches to eL2CAP Gustavo F. Padovan
2010-04-14 19:41 ` [PATCH 1/7] Bluetooth: Fix bug when retransmitting I-frames Gustavo F. Padovan
2010-04-14 19:41 ` [PATCH 2/7] Bluetooth: Fix Indentation on L2CAP Gustavo F. Padovan
2010-04-14 19:41 ` Gustavo F. Padovan [this message]
2010-04-14 19:41 ` [PATCH 4/7] Bluetooth: Add Kconfig option for L2CAP Extended Features Gustavo F. Padovan
2010-04-14 19:41 ` [PATCH 5/7] Bluetooth: Add SOCK_STREAM support to L2CAP Gustavo F. Padovan
2010-04-14 19:41 ` [PATCH 6/7] Bluetooth: Implement missing parts of the Invalid Frame Detection Gustavo F. Padovan
2010-04-14 19:41 ` [PATCH 7/7] Bluetooth: Implement Local Busy Condition handling Gustavo F. Padovan
2010-04-16 0:11 ` [PATCH] " Gustavo F. Padovan
2010-04-21 0:06 ` Gustavo F. 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=1271274112-7806-4-git-send-email-padovan@profusion.mobi \
--to=padovan@profusion.mobi \
--cc=gustavo@padovan.org \
--cc=jprvita@profusion.mobi \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=ulisses@profusion.mobi \
/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).