lkml.org 
[lkml]   [2020]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 09/41] media: atomisp: hmm_bo: untag user pointers
Date
The kernel ABI was extended to allow pass tagged user pointers.

Untag the pointers in this function.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
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.26.2
\
 
 \ /
  Last update: 2020-05-30 09:01    [W:0.180 / U:8.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site