mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
qseecom: add mutex around qseecom_set_client_mem_param
Add mutex around qseecom_set_client_mem_param to prevent an ioctl thread modifying and corrupting data which is being processed by another ioctl in the other thread Change-Id: I0cfb8afab4001c2913be693dfe44c761b9568893 Signed-off-by: Zhen Kong <zkong@codeaurora.org>
This commit is contained in:
parent
06f8886176
commit
7a939ce286
1 changed files with 4 additions and 0 deletions
|
@ -2222,7 +2222,11 @@ static long qseecom_ioctl(struct file *file, unsigned cmd,
|
|||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
mutex_lock(&app_access_lock);
|
||||
atomic_inc(&data->ioctl_count);
|
||||
ret = qseecom_set_client_mem_param(data, argp);
|
||||
atomic_dec(&data->ioctl_count);
|
||||
mutex_unlock(&app_access_lock);
|
||||
if (ret)
|
||||
pr_err("failed Qqseecom_set_mem_param request: %d\n",
|
||||
ret);
|
||||
|
|
Loading…
Reference in a new issue