aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@intel.com>2014-06-23 11:42:44 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-06-23 12:22:48 -0400
commit48439d501e3d9e8634bdc0c418e066870039599d (patch)
tree156194aaaa8cb08115ad44c41d925a72dc8053ad
parent1d56dc4f5f7cdf0ba99062d974b7586a28fc5cf4 (diff)
Bluetooth: Ignore H5 non-link packets in non-active state
When detecting a non-link packet, h5_reset_rx() frees the Rx skb. Not returning after that will cause the upcoming h5_rx_payload() call to dereference a now NULL Rx skb and trigger a kernel oops. Signed-off-by: Loic Poulain <loic.poulain@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Cc: stable@vger.kernel.org
-rw-r--r--drivers/bluetooth/hci_h5.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 04680ead9275..fede8ca7147c 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -406,6 +406,7 @@ static int h5_rx_3wire_hdr(struct hci_uart *hu, unsigned char c)
406 H5_HDR_PKT_TYPE(hdr) != HCI_3WIRE_LINK_PKT) { 406 H5_HDR_PKT_TYPE(hdr) != HCI_3WIRE_LINK_PKT) {
407 BT_ERR("Non-link packet received in non-active state"); 407 BT_ERR("Non-link packet received in non-active state");
408 h5_reset_rx(h5); 408 h5_reset_rx(h5);
409 return 0;
409 } 410 }
410 411
411 h5->rx_func = h5_rx_payload; 412 h5->rx_func = h5_rx_payload;