summaryrefslogtreecommitdiffstats
path: root/drivers/tee
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2019-11-07 11:43:02 +0100
committerJens Wiklander <jens.wiklander@linaro.org>2020-02-28 13:37:42 +0100
commit758ecf13a41a9dc4f019c1381566132ef46c08ee (patch)
tree2188303403a3ebf7558f9c1f9285cecd47118f89 /drivers/tee
parent5271b2011e448f1be7433554e4684e91951476fa (diff)
downloadlinux-758ecf13a41a9dc4f019c1381566132ef46c08ee.tar.gz
linux-758ecf13a41a9dc4f019c1381566132ef46c08ee.tar.bz2
linux-758ecf13a41a9dc4f019c1381566132ef46c08ee.zip
tee: tee_shm_op_mmap(): use TEE_SHM_USER_MAPPED
tee_shm_op_mmap() uses the TEE_SHM_USER_MAPPED flag instead of the TEE_SHM_REGISTER flag to tell if a shared memory object is originating from registered user space memory. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r--drivers/tee/tee_shm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c
index b01d2b7eea71..bd679b72bd05 100644
--- a/drivers/tee/tee_shm.c
+++ b/drivers/tee/tee_shm.c
@@ -76,7 +76,7 @@ static int tee_shm_op_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
size_t size = vma->vm_end - vma->vm_start;
/* Refuse sharing shared memory provided by application */
- if (shm->flags & TEE_SHM_REGISTER)
+ if (shm->flags & TEE_SHM_USER_MAPPED)
return -EINVAL;
return remap_pfn_range(vma, vma->vm_start, shm->paddr >> PAGE_SHIFT,