diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-26 09:45:16 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-06-11 18:09:44 +0200 |
commit | 576680cd014b5c6fd6d50abd8a43af83b016088f (patch) | |
tree | 04ba3b7b2af8c6e0b5558bab412023cc3dbc08dc /drivers | |
parent | 08fef4fa947ba75cbf59d67c6be75223c6471a88 (diff) |
media: atomisp: hmm_bo: untag user pointers
The kernel ABI was extended to allow pass tagged user pointers.
Untag the pointers in this function.
Fixes: d93445225cd3 ("uaccess: add noop untagged_addr definition")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c b/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c index 492b76c29490..6fce8c95be1d 100644 --- a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c +++ b/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c @@ -997,6 +997,9 @@ static int alloc_user_pages(struct hmm_buffer_object *bo, * Handle frame buffer allocated in other kerenl space driver * and map to user space */ + + userptr = untagged_addr(userptr); + if (vma->vm_flags & (VM_IO | VM_PFNMAP)) { page_nr = get_pfnmap_pages(current, current->mm, (unsigned long)userptr, |