mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
msm: adsprpc: Clean buffers on remote invocation failure
Current code doesn't clean up buffers and dma handles when failure is seen in the remote invocation to DSP. This will end up leaking buffers and also dma handles pointing to wrong memory in the fastrpc kernel. Clean buffers and dma handles even when remote invocation to DSP returns failure. Change-Id: I23998a1825f14a4c97380e284626df18f5045ed8 Signed-off-by: Himateja Reddy <hmreddy@codeaurora.org>
This commit is contained in:
parent
8a5a25a98e
commit
4d7fb4cc7f
1 changed files with 4 additions and 4 deletions
|
|
@ -2844,15 +2844,15 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
|
|||
inv_args(ctx);
|
||||
PERF_END);
|
||||
|
||||
VERIFY(err, 0 == (err = ctx->retval));
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
PERF(fl->profile, GET_COUNTER(perf_counter, PERF_PUTARGS),
|
||||
VERIFY(err, 0 == (err = put_args(kernel, ctx, invoke->pra)));
|
||||
PERF_END);
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
VERIFY(err, 0 == (err = ctx->retval));
|
||||
if (err)
|
||||
goto bail;
|
||||
bail:
|
||||
if (ctx && interrupted == -ERESTARTSYS) {
|
||||
trace_fastrpc_context_interrupt(cid, (uint64_t)ctx,
|
||||
|
|
|
|||
Loading…
Reference in a new issue