msm: adsprpc: use correct size while copying user data

Currently, an uninitialized size variable is being used to copy
data from user. Use correct size while copying user concurrency
info for enabling persistent headers.

Change-Id: Ie81305060f2f278b29def11508cdc9851677d33e
Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: Himateja Reddy <hmreddy@codeaurora.org>
This commit is contained in:
Himateja Reddy 2020-12-18 13:04:28 -08:00
commit 93c75f2941

View file

@ -3320,7 +3320,8 @@ static int fastrpc_internal_invoke2(struct fastrpc_file *fl,
(void *)inv2->invparam, fl);
break;
case FASTRPC_INVOKE2_KERNEL_OPTIMIZATIONS:
if (inv2->size != sizeof(uint32_t)) {
size = sizeof(uint32_t);
if (inv2->size != size) {
err = -EBADE;
goto bail;
}