From: Sebastian Reichel <sre@kernel.org>
To: Sebastian Reichel <sre@kernel.org>,
Marcel Holtmann <marcel@holtmann.org>,
Gustavo Padovan <gustavo@padovan.org>,
Rob Herring <robh+dt@kernel.org>
Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure
Date: Sat, 15 Apr 2017 23:54:13 +0200 [thread overview]
Message-ID: <20170415215413.15648-1-sre@kernel.org> (raw)
In-Reply-To: <20170415194854.byado7bxupbdhivp@earth>
Avoid NULL pointer dereference occurring due to freeing
skb containing an error pointer. It can easily be triggered
by using the driver with broken uart (i.e. due to misconfigured
pinmuxing).
Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
drivers/bluetooth/hci_ll.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 485e8eb04542..adc444f309a3 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -537,8 +537,7 @@ static int read_local_version(struct hci_dev *hdev)
if (IS_ERR(skb)) {
bt_dev_err(hdev, "Reading TI version information failed (%ld)",
PTR_ERR(skb));
- err = PTR_ERR(skb);
- goto out;
+ return PTR_ERR(skb);
}
if (skb->len != sizeof(*ver)) {
err = -EILSEQ;
--
2.11.0
next prev parent reply other threads:[~2017-04-15 21:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 15:03 [PATCH v3 0/4] TI Bluetooth serdev support Rob Herring
2017-04-13 15:03 ` [PATCH v3 1/4] dt-bindings: net: Add TI WiLink shared transport binding Rob Herring
2017-04-15 19:38 ` Sebastian Reichel
[not found] ` <CAHCN7x+HhwmXGxZn_31LuzdkEdoAnOSxukAdXULrGbSeKmrtRQ@mail.gmail.com>
[not found] ` <CAHCN7xLHZmS_3+JygQgRxi_tX0mXL22D1Nj9T8jkrMz3-8eQDg@mail.gmail.com>
2017-04-16 14:09 ` Adam Ford
2017-04-19 20:49 ` Rob Herring
2017-04-13 15:03 ` [PATCH v3 2/4] bluetooth: hci_uart: remove unused hci_uart_init_tty Rob Herring
2017-04-13 15:03 ` [PATCH v3 3/4] bluetooth: hci_uart: add LL protocol serdev driver support Rob Herring
2017-04-15 19:48 ` Sebastian Reichel
2017-04-15 21:54 ` Sebastian Reichel [this message]
2017-04-16 18:32 ` [PATCH] Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure Marcel Holtmann
2017-04-17 20:11 ` [PATCH v3 3/4] bluetooth: hci_uart: add LL protocol serdev driver support Adam Ford
2017-04-19 20:47 ` Rob Herring
2017-04-13 15:03 ` [PATCH v3 4/4] arm64: dts: hikey: add WL1835 Bluetooth device node Rob Herring
2017-04-13 17:24 ` [PATCH v3 0/4] TI Bluetooth serdev support 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=20170415215413.15648-1-sre@kernel.org \
--to=sre@kernel.org \
--cc=gustavo@padovan.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=robh+dt@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).