dsp-kernel: Check pdrcount count along with pd status
Currently, only pd status is checked before sending any request to DSP. On pd down notification all the pending contexts are completed with connection reset error. But, if context gets created after the pd down callback, it is not returned with connection reset error. If the context is regarding pd attach, daemon will get attached to DSP pd. And in this scenario, if daemon gets killed and reconnection happens, ownership of init memory will be assigned back to HLOS, which will cause SMMU fault. Check pdr count for audioPD before sending any request to DSP. Change-Id: Iadf1c9ca718659086fcd6dc8db105f48337933f6 Signed-off-by: Abhishek Singh <quic_abhishes@quicinc.com>
This commit is contained in:
@@ -6830,6 +6830,13 @@ static int fastrpc_check_pd_status(struct fastrpc_file *fl, char *sloc_name)
|
|||||||
err = fastrpc_get_spd_session(sloc_name, &session, &cid);
|
err = fastrpc_get_spd_session(sloc_name, &session, &cid);
|
||||||
if (err || cid != fl->cid)
|
if (err || cid != fl->cid)
|
||||||
goto bail;
|
goto bail;
|
||||||
|
if ((!strcmp(fl->servloc_name,
|
||||||
|
AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME)) &&
|
||||||
|
(me->channel[cid].spd[session].pdrcount !=
|
||||||
|
me->channel[cid].spd[session].prevpdrcount)) {
|
||||||
|
err = -ECONNRESET;
|
||||||
|
goto bail;
|
||||||
|
}
|
||||||
#if IS_ENABLED(CONFIG_QCOM_PDR_HELPERS)
|
#if IS_ENABLED(CONFIG_QCOM_PDR_HELPERS)
|
||||||
if (!strcmp(fl->servloc_name,
|
if (!strcmp(fl->servloc_name,
|
||||||
AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME) || !strcmp(fl->servloc_name,
|
AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME) || !strcmp(fl->servloc_name,
|
||||||
|
Reference in New Issue
Block a user