diff options
author | Tharun Kumar Merugu <mtharu@codeaurora.org> | 2017-06-22 10:45:43 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-07-03 04:54:30 -0700 |
commit | f7a56df0ca540963be36405ee18a3a2b695bdd9e (patch) | |
tree | 55f001c0be2a382a8bf6577f008afd1e841e2111 /drivers/char | |
parent | bc399a65c4e048d98b6304272e32402bfca59dda (diff) |
msm: ADSPRPC: Initialize FastRPC invoke metadata
Initializing metadata buffer to zero before reusing the buffer
for next invoke.
Change-Id: Iaab3478732b83427a475e95afa0e031cb76f60d9
Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/adsprpc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index ed0226131b90..0c89ab992012 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -1140,6 +1140,9 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx) if (err) goto bail; } + if (ctx->buf->virt && metalen <= copylen) + memset(ctx->buf->virt, 0, metalen); + /* copy metadata */ rpra = ctx->buf->virt; ctx->rpra = rpra; |