summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2021-07-10 21:23:46 +0300
committerMichael Bestas <mkbestas@lineageos.org>2021-07-10 21:23:46 +0300
commitd46db1f472cf55742a7a2db10218cdcc084e0daf (patch)
tree83eb78fe6731210f67c0b4910223118881b5234b /drivers/char
parent0ce166e3c4e576ae072d950006a937931df8ca3c (diff)
parentaea8f366b3776d8903cc0fa008c0682030d101c7 (diff)
Merge tag 'LA.UM.9.2.r1-03400-SDMxx0.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4 into lineage-18.1-caf-msm8998
* tag 'LA.UM.9.2.r1-03400-SDMxx0.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4: diag: Use valid data_source for a valid token Change-Id: Ie86f072048d1863b07d74ef1e6500b5f18e75963
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/diag/diag_dci.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/char/diag/diag_dci.c b/drivers/char/diag/diag_dci.c
index cf2e08f65b64..1fe7fa0debcc 100644
--- a/drivers/char/diag/diag_dci.c
+++ b/drivers/char/diag/diag_dci.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2021, 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
@@ -1061,6 +1061,11 @@ void extract_dci_pkt_rsp(unsigned char *buf, int len, int data_source,
return;
}
+ if (token != entry->client_info.token) {
+ mutex_unlock(&driver->dci_mutex);
+ return;
+ }
+
mutex_lock(&entry->buffers[data_source].buf_mutex);
rsp_buf = entry->buffers[data_source].buf_cmd;