kernel/0001-RDMA-uverbs-Fix-compilation-error-on-s390-and-mips-p.patch
2019-04-29 16:46:30 +00:00

42 lines
1.6 KiB
Diff

From d79a26b99f5f40db6863b1973750fd1d134d99b4 Mon Sep 17 00:00:00 2001
From: Leon Romanovsky <leonro@mellanox.com>
Date: Mon, 29 Apr 2019 13:00:14 +0300
Subject: [PATCH] RDMA/uverbs: Fix compilation error on s390 and mips platforms
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: stable@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Doug Ledford <dledford@redhat.com>
Cc: Jason Gunthorpe <jgg@mellanox.com>
Fixes: 67f269b37f9b ("RDMA/ucontext: Fix regression with disassociate")
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
---
drivers/infiniband/core/uverbs_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index db20b6e0f253..d6408bbe94ed 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -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;
}
--
2.20.1