Skip to content

RDMA/rxe: Correct race conditions

Bob Pearson linux-rdma 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest4 patches 0 repliesNew
  2. v88 patches 4 repliesSuperseded
  3. v78 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v68 patches7 repliesSuperseded
v58 patches0 repliesSuperseded

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4RDMA/rxe: Move keyed objects to rxe_mcast.cdrivers/infiniband/sw/rxe/rxe.c drivers/infiniband/sw/rxe/rxe_loc.h drivers/infiniband/sw/rxe/rxe_mcast.c +7 more+367 -3870 replies
2/4RDMA/rxe: Replace RB tree by xarray for indexesdrivers/infiniband/sw/rxe/rxe.c drivers/infiniband/sw/rxe/rxe_mr.c drivers/infiniband/sw/rxe/rxe_mw.c +3 more+205 -3420 replies
3/4RDMA/rxe: Fix ref error in rxe_av.cdrivers/infiniband/sw/rxe/rxe_av.c drivers/infiniband/sw/rxe/rxe_loc.h drivers/infiniband/sw/rxe/rxe_net.c +2 more+63 -350 replies
4/4RDMA/rxe: Replace mr by rkey in responder resourcesdrivers/infiniband/sw/rxe/rxe_qp.c drivers/infiniband/sw/rxe/rxe_resp.c drivers/infiniband/sw/rxe/rxe_verbs.h+87 -470 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v9 yet.

Read the v9 thread

Cover letter [PATCH for-next v9 0/4] RDMA/rxe: Correct race conditions

There are several race conditions discovered in the current rdma_rxe driver. They mostly relate to races between normal operations and destroying objects. This patch series
- Makes several minor cleanups in rxe_pool.[ch]
- Replaces the red-black trees currently used by xarrays for indices
- Moves the red-black trees used for keyed objects to rxe_mcast which was the only use case.
- Corrects several reference counting errors
- rebased to current for-next

This patch series applies cleanly to current for-next. commit c0fe82baaeb2 ("Merge tag 'v5.16' into rdma.git for-next")

---
v9
Following a suggestion of Jason moved all the key code into rxe_mcast.c and separated these objects from the pools. Tightened up locking to make changes to ref count and xarray atomic with each other.
Combined things to just for patches.
Dropped the 0008 patch from v8 as not really necessary.
v8
Fixed an additional race in 3/8 which was not handled correctly.
v7
Corrected issues reported by Jason Gunthorpe

v6
Fixed a kzalloc flags bug.
Fixed comment bug reported by 'Kernel Test Robot'.
Changed type of rxe_pool.c in __rxe_fini().
v5
Removed patches already accepted into for-next and addressed comments from Jason Gunthorpe.
v4
Restructured patch series to change to xarray earlier which greatly simplified the changes.
Rebased to current for-next
v3
Changed rxe_alloc to use GFP_KERNEL
Addressed other comments by Jason Gunthorp
Merged the previous 06/10 and 07/10 patches into one since they overlapped Added some minor cleanups as 10/10
v2
Rebased to current for-next.
Added 4 additional patches

Bob Pearson (4):
RDMA/rxe: Move keyed objects to rxe_mcast.c RDMA/rxe: Replace RB tree by xarray for indexes RDMA/rxe: Fix ref error in rxe_av.c RDMA/rxe: Replace mr by rkey in responder resources

 drivers/infiniband/sw/rxe/rxe.c       | 104 +-----
 drivers/infiniband/sw/rxe/rxe_av.c    |  19 +-
 drivers/infiniband/sw/rxe/rxe_loc.h   |  24 +-
 drivers/infiniband/sw/rxe/rxe_mcast.c | 436 ++++++++++++++++------
 drivers/infiniband/sw/rxe/rxe_mr.c    |   1 -
 drivers/infiniband/sw/rxe/rxe_mw.c    |   4 -
 drivers/infiniband/sw/rxe/rxe_net.c   |  35 +-
 drivers/infiniband/sw/rxe/rxe_pool.c  | 498 +++++++++-----------------
 drivers/infiniband/sw/rxe/rxe_pool.h  | 109 +-----
 drivers/infiniband/sw/rxe/rxe_qp.c    |  15 +-
 drivers/infiniband/sw/rxe/rxe_recv.c  |  28 +-
 drivers/infiniband/sw/rxe/rxe_req.c   |  55 +--
 drivers/infiniband/sw/rxe/rxe_resp.c  | 125 +++++--
 drivers/infiniband/sw/rxe/rxe_verbs.c |  38 --
 drivers/infiniband/sw/rxe/rxe_verbs.h |  30 +-
 15 files changed, 716 insertions(+), 805 deletions(-)
Signature · 1 line
2.32.0