Skip to contentSkip to conversation

RDMA/uverbs: Fix compilation error on s390 and mips platforms

PATCH New Leon Romanovsky 1 participant 1 message Apr 29, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/uverbs: Fix compilation error on s390 and mips platforms

From: Leon Romanovsky <[email protected]>

Most platforms ignore parameter provided to ZERO_PAGE macro, hence wrong parameter was used and missed. This caused to compilation error like presented below.

drivers/infiniband/core/uverbs_main.c: In function 'rdma_umap_fault':
drivers/infiniband/core/uverbs_main.c:898:28: error: 'struct vm_fault' has no member named 'vm_start'

   vmf->page = ZERO_PAGE(vmf->vm_start);
                            ^~
Cc Geert Uytterhoeven <[email protected]>
Cc Doug Ledford <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Fixes 67f269b37f9b ("RDMA/ucontext: Fix regression with disassociate")
---
 drivers/infiniband/core/uverbs_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/uverbs_main.c +1 -1
index 7843e89235c3..65fe89b3fa2d 100644
@@ -895,7 +895,7 @@ static vm_fault_t rdma_umap_fault(struct vm_fault *vmf)
 
 	/* Read only pages can just use the system zero page. */
 	if (!(vmf->vma->vm_flags & (VM_WRITE | VM_MAYWRITE))) {
-		vmf->page = ZERO_PAGE(vmf->vm_start);
+		vmf->page = ZERO_PAGE(vmf->vma->vm_start);
 		get_page(vmf->page);
 		return 0;
 	}