Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb54b9db authored by Katish Paran's avatar Katish Paran Committed by Bernhard Thoben
Browse files

diag: dci: Add mutex protection while accessing client details



Currently while extracting events and logs information from
the data read over peripherals, the clients details are accessed
without mutex protection. As the client access may happen from
multiple context, mutex protection is needed. This patch
resolves the same.

Bug: 62378232
Change-Id: I9bd115e1cd9eebc625f4a68854d554ff874d866d
Signed-off-by: default avatarKatish Paran <kparan@codeaurora.org>
(cherry picked from commit ab17770625ffe74df3b423311fa717225d1a445e)
parent 42c08285
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, 2017 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
+2 −0
Original line number Diff line number Diff line
@@ -1585,6 +1585,7 @@ exit:
				goto end;
			}
		}
		mutex_lock(&driver->diagchar_mutex);
		for (i = 0; i < NUM_SMD_DCI_CHANNELS; i++) {
			if (driver->smd_dci[i].ch) {
				queue_work(driver->diag_dci_wq,
@@ -1602,6 +1603,7 @@ exit:
				}
			}
		}
		mutex_unlock(&driver->diagchar_mutex);
		mutex_unlock(&driver->dci_mutex);
		goto end;
	}