mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
msm: kgsl: Access map_count only if entry is successfully allocated
In kgsl_mem_entry_create, access map_count only if entry is allocated successfully to avoid invalid access. Change-Id: I57bce1aec2da6a27b6d13dbee96ed86a45c9660c Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
This commit is contained in:
parent
cb6f97e574
commit
cfc73b1e63
1 changed files with 1 additions and 1 deletions
|
|
@ -252,9 +252,9 @@ static struct kgsl_mem_entry *kgsl_mem_entry_create(void)
|
|||
kref_init(&entry->refcount);
|
||||
/* put this ref in userspace memory alloc and map ioctls */
|
||||
kref_get(&entry->refcount);
|
||||
atomic_set(&entry->map_count, 0);
|
||||
}
|
||||
|
||||
atomic_set(&entry->map_count, 0);
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue