mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
misc: fastrpc: handle interrupted contexts
Buffers owned by a context that has been interrupted either by a signal or a timeout might still be being accessed by the DSP. delegate returning the associated memory to a later time when the device is released. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20191009144123.24583-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
55bcda3558
commit
387f625585
1 changed files with 7 additions and 6 deletions
|
@ -984,12 +984,13 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel,
|
|||
}
|
||||
|
||||
bail:
|
||||
/* We are done with this compute context, remove it from pending list */
|
||||
spin_lock(&fl->lock);
|
||||
list_del(&ctx->node);
|
||||
spin_unlock(&fl->lock);
|
||||
fastrpc_context_put(ctx);
|
||||
|
||||
if (err != -ERESTARTSYS && err != -ETIMEDOUT) {
|
||||
/* We are done with this compute context */
|
||||
spin_lock(&fl->lock);
|
||||
list_del(&ctx->node);
|
||||
spin_unlock(&fl->lock);
|
||||
fastrpc_context_put(ctx);
|
||||
}
|
||||
if (err)
|
||||
dev_dbg(fl->sctx->dev, "Error: Invoke Failed %d\n", err);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue