IB/hfi1: Race hazard avoidance in user SDMA driver
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Tue, 21 Mar 2017 00:24:45 +0000 (17:24 -0700)
committerDoug Ledford <dledford@redhat.com>
Wed, 5 Apr 2017 18:45:09 +0000 (14:45 -0400)
commit0519c520dc38e9950f4032d0f41f2b72b2c3c940
tree56b111fa3e75f6c09cf0b9988a55becd8ec8aa16
parentec8a142327f85ae9aa5ad784520e669a34839941
IB/hfi1: Race hazard avoidance in user SDMA driver

Set the errcode before the state and add the smb_wmb() to avoid a
potential race condition with the user.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Michael Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/user_sdma.c