diff options
author | Bart Van Assche <bvanassche@acm.org> | 2014-10-21 16:00:35 (GMT) |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 11:05:24 (GMT) |
commit | 7dad6b2e440d810273946b0e7092a8fe043c3b8a (patch) | |
tree | cfb1127e6a552d864506126f6dfc6186d8b3357c /drivers/infiniband/ulp/srp/ib_srp.h | |
parent | d92c0da71a35dfddccca7bfa932829504311359e (diff) | |
download | linux-7dad6b2e440d810273946b0e7092a8fe043c3b8a.tar.xz |
IB/srp: Fix a race condition triggered by destroying a queue pair
At least LID reassignment can trigger a race condition in the SRP
initiator driver, namely the receive completion handler trying to
post a request on a QP during or after QP destruction and before
the CQ's have been destroyed. Avoid this race by modifying a QP
into the error state and by waiting until all receive completions
have been processed before destroying a QP.
Reported-by: Max Gurtuvoy <maxg@mellanox.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/infiniband/ulp/srp/ib_srp.h')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index ca7c6f0..a611556 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h @@ -70,6 +70,8 @@ enum { LOCAL_INV_WR_ID_MASK = 1, FAST_REG_WR_ID_MASK = 2, + + SRP_LAST_WR_ID = 0xfffffffcU, }; enum srp_target_state { |