git: d6226d6adb3a - main - cxgbe/iw_cxgbe: Initialize the vma correctly in c4iw_mmap.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 Apr 2022 21:22:35 UTC
The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=d6226d6adb3aab73438e5a7d13e79c532e7b4062 commit d6226d6adb3aab73438e5a7d13e79c532e7b4062 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2022-04-01 19:58:14 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2022-04-01 20:09:40 +0000 cxgbe/iw_cxgbe: Initialize the vma correctly in c4iw_mmap. This fixes userspace RDMA applications that would fail due to mmap failure. The driver's mmap routine would succeed but later the linux_compat.c mmap routine would fail because vma->vm_private_data wasn't set properly. This is catch-up with b633e08c705fe43180567eae26923d6f6f98c8d9. Reported by: Veeresh @ Chelsio Sponsored by: Chelsio Communications --- sys/dev/cxgbe/iw_cxgbe/provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/iw_cxgbe/provider.c b/sys/dev/cxgbe/iw_cxgbe/provider.c index 10b990e21f98..bfa00bb4c658 100644 --- a/sys/dev/cxgbe/iw_cxgbe/provider.c +++ b/sys/dev/cxgbe/iw_cxgbe/provider.c @@ -201,8 +201,8 @@ static int c4iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) addr < rdev->bar2_pa + rdev->bar2_len) vma->vm_page_prot = t4_pgprot_wc(vma->vm_page_prot); - ret = io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT, - len, vma->vm_page_prot); + ret = rdma_user_mmap_io(context, vma, addr >> PAGE_SHIFT, len, + vma->vm_page_prot, NULL); CTR4(KTR_IW_CXGBE, "%s:4 ctx %p vma %p ret %u", __func__, context, vma, ret); return ret;