msm: adsprpc: Handle SSR error code after invoke send

Currently, on SSR notification connection reset
error is returned even if invoke send completes
successfully. So, if there is invoke call for PD
spawn, init memory gets freed after receiving the
error. Currently, if init memory is accessed on DSP,
SMMU fault occurs. If internal invoke is successfully
completed, return the connection reset error only
for non-kernel handles.

Change-Id: I2f35a22562fac14a410815df6121cb1df80982a4
Acked-by: Abhishek Singh<abhishes@qti.qualcomm.com>
Signed-off-by: Ansa Ahmed <quic_ansa@quicinc.com>
This commit is contained in:
Ansa Ahmed
2023-06-15 11:45:09 +05:30
committed by Gerrit - the friendly Code Review server
parent 6e70c954d5
commit bed0667a56

View File

@@ -3364,9 +3364,11 @@ int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
context_free(ctx);
trace_fastrpc_msg("context_free: end");
}
if (VALID_FASTRPC_CID(cid)
&& (fl->ssrcount != fl->apps->channel[cid].ssrcount))
err = -ECONNRESET;
if (!kernel) {
if (VALID_FASTRPC_CID(cid)
&& (fl->ssrcount != fl->apps->channel[cid].ssrcount))
err = -ECONNRESET;
}
invoke_end:
if (fl->profile && !interrupted && isasyncinvoke)