From 2e6cd4910bd334c75d9a92d16cf82e5082b64d6d Mon Sep 17 00:00:00 2001 From: Jeya R Date: Tue, 12 Jan 2021 07:30:50 -0800 Subject: [PATCH] msm: adsprpc: Add logs to identify thread exit called Added debug logs to identify whether thread exit is called when ioctl call interrupted. Change-Id: I5129237ee90ad80402f8f52b20dd015bc03cd0fc Acked-by: Krishnaiah Tadakamalla Signed-off-by: Jeya R --- drivers/char/adsprpc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index f07840572ae9..bc0a0d9e672c 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ /* Uncomment this block to log an error on every VERIFY failure */ @@ -426,6 +426,9 @@ struct smq_invoke_ctx { struct fastrpc_async_job asyncjob; /* Async early flag to check the state of context */ bool is_early_wakeup; + uint32_t sc_interrupted; + struct fastrpc_file *fl_interrupted; + uint32_t handle_interrupted; }; struct fastrpc_ctx_lst { @@ -1651,6 +1654,9 @@ static int context_restore_interrupted(struct fastrpc_file *fl, if (ictx->pid == current->pid) { if (invoke->sc != ictx->sc || ictx->fl != fl) { err = -EINVAL; + ictx->sc_interrupted = invoke->sc; + ictx->fl_interrupted = fl; + ictx->handle_interrupted = invoke->handle; ADSPRPC_ERR( "interrupted sc (0x%x) or fl (%pK) does not match with invoke sc (0x%x) or fl (%pK)\n", ictx->sc, ictx->fl, invoke->sc, fl);