]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit77c682ac86343fef46902d2e9401ca5ce221393a
tree0cc0c1e84b4648ee19949703fadb25f2f88c358c
parenta4a52ae81e1238eea57e043635f5723272d4eddc
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