Skip to content

Commit fa8dac3

Browse files
mmarcinijgunthorpe
authored andcommitted
IB/hfi1: Fix another case where pq is left on waitlist
The commit noted below fixed a case where a pq is left on the sdma wait list. It however missed another case. user_sdma_send_pkts() has two calls from hfi1_user_sdma_process_request(). If the first one fails as indicated by -EBUSY, the pq will be placed on the waitlist as by design. If the second call then succeeds, the pq is still on the waitlist setting up a race with the interrupt handler if a subsequent request uses a different SDMA engine Fix by deleting the first call. The use of pcount and the intent to send a short burst of packets followed by the larger balance of packets was never correctly implemented, because the two calls always send pcount packets no matter what. A subsequent patch will correct that issue. Fixes: 9a293d1 ("IB/hfi1: Ensure pq is not left on waitlist") Link: https://lore.kernel.org/r/20200504130917.175613.43231.stgit@awfm-01.aw.intel.com Cc: <stable@vger.kernel.org> Reviewed-by: Kaike Wan <kaike.wan@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 856ec7f commit fa8dac3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/infiniband/hw/hfi1/user_sdma.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,10 +589,6 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
589589

590590
set_comp_state(pq, cq, info.comp_idx, QUEUED, 0);
591591
pq->state = SDMA_PKT_Q_ACTIVE;
592-
/* Send the first N packets in the request to buy us some time */
593-
ret = user_sdma_send_pkts(req, pcount);
594-
if (unlikely(ret < 0 && ret != -EBUSY))
595-
goto free_req;
596592

597593
/*
598594
* This is a somewhat blocking send implementation.

0 commit comments

Comments
 (0)