mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
Merge "adsprpc: Avoid race condition during map find and free"
This commit is contained in:
commit
1f43952716
1 changed files with 2 additions and 0 deletions
|
|
@ -1002,9 +1002,11 @@ static void fastrpc_mmap_free(struct fastrpc_mmap *map, uint32_t flags)
|
|||
}
|
||||
if (map->flags == ADSP_MMAP_HEAP_ADDR ||
|
||||
map->flags == ADSP_MMAP_REMOTE_HEAP_ADDR) {
|
||||
spin_lock(&me->hlock);
|
||||
map->refs--;
|
||||
if (!map->refs)
|
||||
hlist_del_init(&map->hn);
|
||||
spin_unlock(&me->hlock);
|
||||
if (map->refs > 0) {
|
||||
ADSPRPC_WARN(
|
||||
"multiple references for remote heap size %zu va 0x%lx ref count is %d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue