From: Martin Townsend <mtownsend1973@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org, jukka.rissanen@linux.intel.com,
johan.hedberg@gmail.com,
Martin Townsend <mtownsend1973@gmail.com>
Subject: [PATCH bluetooth] Bluetooth: Fix missing channel unlock in l2cap_le_credits
Date: Mon, 13 Oct 2014 19:24:45 +0100 [thread overview]
Message-ID: <1413224685-3700-1-git-send-email-mtownsend1973@gmail.com> (raw)
In the error case where credits is greater than max_credits there
is a missing l2cap_chan_unlock before returning.
Signed-off-by: Martin Townsend <mtownsend1973@gmail.com>
---
net/bluetooth/l2cap_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 46547b9..bfb6af8 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -5544,6 +5544,7 @@ static inline int l2cap_le_credits(struct l2cap_conn *conn,
if (credits > max_credits) {
BT_ERR("LE credits overflow");
l2cap_send_disconn_req(chan, ECONNRESET);
+ l2cap_chan_unlock(chan);
/* Return 0 so that we don't trigger an unnecessary
* command reject packet.
--
1.9.1
next reply other threads:[~2014-10-13 18:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 18:24 Martin Townsend [this message]
2014-10-14 8:31 ` [PATCH bluetooth] Bluetooth: Fix missing channel unlock in l2cap_le_credits Jukka Rissanen
2014-10-14 8:38 ` Johan Hedberg
2014-10-17 14:18 ` Marcel Holtmann
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=1413224685-3700-1-git-send-email-mtownsend1973@gmail.com \
--to=mtownsend1973@gmail.com \
--cc=johan.hedberg@gmail.com \
--cc=jukka.rissanen@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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).