summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-03-20 23:18:27 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-03-20 23:18:26 -0700
commit0d536697bfa284c96161e832e18adf3d2b6a121d (patch)
treef2a70166c022db0f926256623555041b2535477d /drivers/soc
parent9f259c5e8d5f20d149ec45f67b4d34cd0cafb53d (diff)
parent1c8d205e0966f1a11b3cf8e62dd83d1fc256878b (diff)
Merge "soc: qcom: tracer_pkt: Fix buffer length check"
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/tracer_pkt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/qcom/tracer_pkt.c b/drivers/soc/qcom/tracer_pkt.c
index 6d1fa590c055..8875207c6334 100644
--- a/drivers/soc/qcom/tracer_pkt.c
+++ b/drivers/soc/qcom/tracer_pkt.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -100,7 +100,7 @@ int tracer_pkt_init(void *data, size_t data_len,
pkt_hdr->reserved = 0;
pkt_hdr->id_valid = 0;
pkt_hdr->qdss_tracing = qdss_tracing ? true : false;
- if (pkt_priv_len > MAX_CC_WLEN * sizeof(uint32_t))
+ if (pkt_priv_len >= MAX_CC_WLEN * sizeof(uint32_t))
pkt_hdr->ccl = MAX_CC_WLEN;
else
pkt_hdr->ccl = pkt_priv_len/sizeof(uint32_t) +