OSDN Git Service

IB/{rdmavt, qib, hfi1}: Convert to new completion API
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Thu, 13 Jun 2019 12:30:52 +0000 (08:30 -0400)
committerDoug Ledford <dledford@redhat.com>
Fri, 21 Jun 2019 02:35:09 +0000 (22:35 -0400)
commit4a9ceb7dbadf9e1435644b1f49720ee87431ce26
tree8a77c25eb30c30d7c27d6781cd3584c35ea1b3a8
parentf56044d686c82bd31713fc0398d68e322813dc62
IB/{rdmavt, qib, hfi1}: Convert to new completion API

Convert all completions to use the new completion routine that
fixes a race between post send and completion where fields from
a SWQE can be read after SWQE has been freed.

This patch also addresses issues reported in
https://marc.info/?l=linux-kernel&m=155656897409107&w=2.

The reserved operation path has no need for any barrier.

The barrier for the other path is addressed by the
smp_load_acquire() barrier.

Cc: Andrea Parri <andrea.parri@amarulasolutions.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/rc.c
drivers/infiniband/hw/qib/qib_rc.c
drivers/infiniband/sw/rdmavt/qp.c
include/rdma/rdmavt_qp.h