Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero()
From: Souptick Joarder
Date: Sun Aug 25 2019 - 15:56:26 EST
On Mon, Aug 26, 2019 at 1:13 AM Jason Gunthorpe <jgg@xxxxxxxx> wrote:
> On Sun, Aug 25, 2019 at 11:37:27AM +0530, Souptick Joarder wrote:
> > First, length passed to mmap is checked explicitly against
> > PAGE_SIZE.
> > Second, if vma->vm_pgoff is passed as non zero, it would return
> > error. It appears like driver is expecting vma->vm_pgoff to
> > be passed as 0 always.
> ? pg_off is not zero
Sorry, I mean, driver has a check against non zero to return error -EOPNOTSUPP
which means in true scenario driver is expecting vma->vm_pgoff should be passed
- if (get_index(vma->vm_pgoff) != MLX5_IB_CLOCK_INFO_V1)
- return -EOPNOTSUPP;