Re: [PATCH for-rc] RDMA/hns: Fix wrong PBL offset when VA is not aligned to PAGE_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 14, 2020 at 07:42:15PM +0800, Weihang Li wrote:
> From: Xi Wang <wangxi11@xxxxxxxxxx>
> 
> The ROCEE use "VA % buf_page_size" to caclulate the offset in the PBL's
> first page, the actual PA corresponding to the MR's VA is equal to MR's
> PA plus this offset. The first PA in PBL has already been aligned to
> PAGE_SIZE after calling ib_umem_get(), but the MR's VA may not. If the
> buf_page_size is small than the PAGE_SIZE, this will lead the ROCEE to
> access the wrong memory because the offset is smaller than expected.
> 
> Fixes: 9b2cf76c9f05 ("RDMA/hns: Optimize PBL buffer allocation process")
> Signed-off-by: Xi Wang <wangxi11@xxxxxxxxxx>
> Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx>
> ---
>  drivers/infiniband/hw/hns/hns_roce_mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-rc, thanks

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux