|
@@ -5476,6 +5476,7 @@ int fastrpc_internal_mem_map(struct fastrpc_file *fl,
|
|
int err = 0;
|
|
int err = 0;
|
|
struct fastrpc_mmap *map = NULL;
|
|
struct fastrpc_mmap *map = NULL;
|
|
|
|
|
|
|
|
+ mutex_lock(&fl->internal_map_mutex);
|
|
VERIFY(err, fl->dsp_proc_init == 1);
|
|
VERIFY(err, fl->dsp_proc_init == 1);
|
|
if (err) {
|
|
if (err) {
|
|
pr_err("adsprpc: ERROR: %s: user application %s trying to map without initialization\n",
|
|
pr_err("adsprpc: ERROR: %s: user application %s trying to map without initialization\n",
|
|
@@ -5514,6 +5515,7 @@ bail:
|
|
mutex_unlock(&fl->map_mutex);
|
|
mutex_unlock(&fl->map_mutex);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ mutex_unlock(&fl->internal_map_mutex);
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5524,6 +5526,7 @@ int fastrpc_internal_mem_unmap(struct fastrpc_file *fl,
|
|
struct fastrpc_mmap *map = NULL;
|
|
struct fastrpc_mmap *map = NULL;
|
|
size_t map_size = 0;
|
|
size_t map_size = 0;
|
|
|
|
|
|
|
|
+ mutex_lock(&fl->internal_map_mutex);
|
|
VERIFY(err, fl->dsp_proc_init == 1);
|
|
VERIFY(err, fl->dsp_proc_init == 1);
|
|
if (err) {
|
|
if (err) {
|
|
pr_err("adsprpc: ERROR: %s: user application %s trying to map without initialization\n",
|
|
pr_err("adsprpc: ERROR: %s: user application %s trying to map without initialization\n",
|
|
@@ -5570,6 +5573,7 @@ bail:
|
|
mutex_unlock(&fl->map_mutex);
|
|
mutex_unlock(&fl->map_mutex);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ mutex_unlock(&fl->internal_map_mutex);
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|