]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Fix bug that caused srq creation to fail
authorLijun Ou <oulijun@huawei.com>
Sun, 7 Apr 2019 05:23:38 +0000 (13:23 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 8 Apr 2019 16:27:58 +0000 (13:27 -0300)
commit6a57f30b9cd4efe5d3a52c14402858fabebdb8c3
tree9c10b2225bb9795a8469a0f7f0bcfc816d810035
parent2c5ec087547cd67b506b3f0e11146c09802492b6
RDMA/hns: Fix bug that caused srq creation to fail

Due to the incorrect use of the seg and obj information, the position of
the mtt is calculated incorrectly, and the free space of the page is not
enough to store the entire mtt, resulting in access to the next page. This
patch fixes this problem.

 Unable to handle kernel paging request at virtual address ffff00006e3cd000
 ...
 Call trace:
  hns_roce_write_mtt+0x154/0x2f0 [hns_roce]
  hns_roce_buf_write_mtt+0xa8/0xd8 [hns_roce]
  hns_roce_create_srq+0x74c/0x808 [hns_roce]
  ib_create_srq+0x28/0xc8

Fixes: 5b745f81b4b7 ("RDMA/hns: Unify the calculation for hem index in hip08")
Signed-off-by: chenglang <chenglang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hem.c
drivers/infiniband/hw/hns/hns_roce_mr.c