From 85f8460563ac7a73975e53d1c2cb71c050473be4 Mon Sep 17 00:00:00 2001 From: Himateja Reddy Date: Wed, 15 Jul 2020 21:04:05 -0700 Subject: [PATCH] msm: adsprpc: use current PID instead of stored PID for validation Use PID from task struct instead of PID stored during get info to validate whether the calling process is a trusted application, so that the sessions feature where the PID is tweaked for the second session does not return a false failure. Change-Id: I177283ccf2333b762148398e299e64d76dbc1926 Acked-by: Thyagarajan Venkatanarayanan Signed-off-by: Himateja Reddy --- drivers/char/adsprpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index a06f2fdc1863..8564e30f725c 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -3211,7 +3211,7 @@ static int fastrpc_init_create_dynamic_process(struct fastrpc_file *fl, * apps are not allowed to offload to signedPD on DSP. This is detected * by comparing current PID with the one stored during device open. */ - if (fl->tgid != fl->tgid_open) { + if (current->tgid != fl->tgid_open) { VERIFY(err, uproc->attrs & FASTRPC_MODE_UNSIGNED_MODULE); if (err) { err = -EINVAL;