RDMA/rxe: Protect user space index loads/stores
authorBob Pearson <rpearsonhpe@gmail.com>
Thu, 27 May 2021 19:47:47 +0000 (14:47 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 3 Jun 2021 18:53:01 +0000 (15:53 -0300)
commit0a67c46d2e9926c8214ed87e57fe51f044203612
treeb74214cfe00d3e3636698412787d94c4669e2566
parent59daff49f25fbb3197c03c879e23a31ddd23d98f
RDMA/rxe: Protect user space index loads/stores

Modify the queue APIs to protect all user space index loads with
smp_load_acquire() and all user space index stores with
smp_store_release(). Base this on the types of the queues which can be one
of ..KERNEL, ..FROM_USER, ..TO_USER. Kernel space indices are protected by
locks which also provide memory barriers.

Link: https://lore.kernel.org/r/20210527194748.662636-3-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_queue.h