From 576680cd014b5c6fd6d50abd8a43af83b016088f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 26 May 2020 09:45:16 +0200 Subject: [PATCH] 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 --- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 3 +++ 1 file changed, 3 insertions(+) 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, -- 2.39.5