diff options
| author | Michael J. Ruhl <[email protected]> | 2018-09-10 09:39:11 -0700 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2018-09-11 10:05:17 -0600 |
| commit | 28a9a9e83ceae2cee25b9af9ad20d53aaa9ab951 (patch) | |
| tree | a87f6e9729e9b5a3d0716b6409fa70aff0932d84 /tools/perf/scripts/python/bin | |
| parent | a0e0cb82804a6a21d9067022c2dfdf80d11da429 (diff) | |
IB/hfi1: Remove race conditions in user_sdma send path
Packet queue state is over used to determine SDMA descriptor
availablitity and packet queue request state.
cpu 0 ret = user_sdma_send_pkts(req, pcount);
cpu 0 if (atomic_read(&pq->n_reqs))
cpu 1 IRQ user_sdma_txreq_cb calls pq_update() (state to _INACTIVE)
cpu 0 xchg(&pq->state, SDMA_PKT_Q_ACTIVE);
At this point pq->n_reqs == 0 and pq->state is incorrectly
SDMA_PKT_Q_ACTIVE. The close path will hang waiting for the state
to return to _INACTIVE.
This can also change the state from _DEFERRED to _ACTIVE. However,
this is a mostly benign race.
Remove the racy code path.
Use n_reqs to determine if a packet queue is active or not.
Reviewed-by: Mitko Haralanov <[email protected]>
Reviewed-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Michael J. Ruhl <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions