OSDN Git Service

bnxt_re: fix the regression due to changes in alloc_pbl
authorDevesh Sharma <devesh.sharma@broadcom.com>
Fri, 22 Feb 2019 12:16:19 +0000 (07:16 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 22 Feb 2019 18:17:22 +0000 (11:17 -0700)
commitc50866e2853a0315ae9669691406c614f5d848b2
treecfa957f641a2c6a77b1c301b49609f9752d31792
parent2612d723aadcf8281f9bf8305657129bd9f3cd57
bnxt_re: fix the regression due to changes in alloc_pbl

While adding the use of for_each_sg_dma_page iterator for Brodcom's rdma
driver, there was a regression added in the __alloc_pbl path. The change
left bnxt_re in DOA state in for-next branch.

Fixing the regression to avoid the host crash when a user space object is
created. Restricting the unconditional access to hwq.pg_arr when hwq is
initialized for user space objects.

Fixes: 161ebe2498d4 ("RDMA/bnxt_re: Use for_each_sg_dma_page iterator on umem SGL")
Reported-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_res.c