All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next v2 0/2] Fix memory ordering errors in queues
@ 2021-05-26  4:51 Bob Pearson
  2021-05-26  4:51 ` [PATCH for-next v2 1/2] RDMA/rxe: Add a type flag to rxe_queue structs Bob Pearson
  2021-05-26  4:51 ` [PATCH for-next v2 2/2] RDMA/rxe: Protect user space index loads/stores Bob Pearson
  0 siblings, 2 replies; 6+ messages in thread
From: Bob Pearson @ 2021-05-26  4:51 UTC (permalink / raw)
  To: jgg, zyjzyj2000, linux-rdma; +Cc: Bob Pearson

These two patches optimize the memory ordering in rxe_queue.h so
that user space and not kernel space indices are protected for loads
with smp_load_acquire() and stores with smp_store_release(). The
original implementation of this did not apply to all index references
which has recently caused test case errors traced to stale memory loads.
These patches fix those errors.

Reported-by: Zhu Yanjun <zyjzyj2000@gmail.com>
Fixes: d21a1240f516 ("RDMA/rxe: Use acquire/release for memory ordering")
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
v2:
  Added a way to distinguish between user and kernel indices.
---
Bob Pearson (2):
  RDMA/rxe: Add a type flag to rxe_queue structs
  RDMA/rxe: Protect user space index loads/stores

 drivers/infiniband/sw/rxe/rxe_cq.c    |   4 +-
 drivers/infiniband/sw/rxe/rxe_qp.c    |  12 +-
 drivers/infiniband/sw/rxe/rxe_queue.c |   8 +-
 drivers/infiniband/sw/rxe/rxe_queue.h | 181 ++++++++++++++++++--------
 drivers/infiniband/sw/rxe/rxe_srq.c   |   4 +-
 5 files changed, 145 insertions(+), 64 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-26 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-26  4:51 [PATCH for-next v2 0/2] Fix memory ordering errors in queues Bob Pearson
2021-05-26  4:51 ` [PATCH for-next v2 1/2] RDMA/rxe: Add a type flag to rxe_queue structs Bob Pearson
2021-05-26  4:51 ` [PATCH for-next v2 2/2] RDMA/rxe: Protect user space index loads/stores Bob Pearson
2021-05-26 10:19   ` Zhu Yanjun
2021-05-26 15:23     ` Pearson, Robert B
2021-05-26 16:52   ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.