RDMA/rxe: Check rxe_get() return value
authorBob Pearson <rpearsonhpe@gmail.com>
Thu, 21 Apr 2022 01:40:36 +0000 (20:40 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 9 May 2022 12:03:45 +0000 (09:03 -0300)
commit4e05a4b329e9416e5aded022feacde4385148f21
tree0cc0c1e84b4648ee19949703fadb25f2f88c358c
parentb2a41678fc21fd39b11f5aca0a8c999f8efcb1a8
RDMA/rxe: Check rxe_get() return value

In the tasklets (completer, responder, and requester) check the return
value from rxe_get() to detect failures to get a reference.  This only
occurs if the qp has had its reference count drop to zero which indicates
that it no longer should be used.

The ref is never 0 today because the tasklets are flushed before the ref
is dropped. The next patch changes this so that the ref is dropped then
the tasklets are flushed.

Link: https://lore.kernel.org/r/20220421014042.26985-4-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_comp.c
drivers/infiniband/sw/rxe/rxe_req.c
drivers/infiniband/sw/rxe/rxe_resp.c