diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-11-26 21:27:46 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-11-26 21:27:46 -0800 |
| commit | 7989c135aba31455141abbcf1994357e263b5f28 (patch) | |
| tree | 208f27b90f43a358ba47c64c9924f3a49bc30ce9 | |
| parent | 4ff6b47f11be743866543782b5248d6d864b13e1 (diff) | |
| parent | 51b8d2c499b884c09a4e05d7fade8f16bb1c30eb (diff) | |
Merge "msm: ion: Modified Secure Display buffer permissions"
| -rw-r--r-- | drivers/staging/android/ion/ion_cma_heap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c index b2e1a4c1b170..b5905fc81147 100644 --- a/drivers/staging/android/ion/ion_cma_heap.c +++ b/drivers/staging/android/ion/ion_cma_heap.c @@ -274,11 +274,16 @@ static int ion_secure_cma_allocate(struct ion_heap *heap, source_vm = VMID_HLOS; dest_vm = get_secure_vmid(flags); + if (dest_vm < 0) { pr_err("%s: Failed to get secure vmid\n", __func__); return -EINVAL; } - dest_perms = PERM_READ | PERM_WRITE; + + if (dest_vm == VMID_CP_SEC_DISPLAY) + dest_perms = PERM_READ; + else + dest_perms = PERM_READ | PERM_WRITE; ret = ion_cma_allocate(heap, buffer, len, align, flags); if (ret) { |
