RDMA/uverbs: Fix compilation error on s390 and mips platforms
Subsystems (2)
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")
Signed-off-by Heiko Carstens <[email protected]>
Signed-off-by Leon Romanovsky <[email protected]>
--- drivers/infiniband/core/uverbs_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/uverbs_main.c +1 -1
@@ -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 ; }