Skip to content

Commit

Permalink
IB/core: Protect against self-requeue of a cq work item
Browse files Browse the repository at this point in the history
We need to make sure that the cq work item does not
run when we are destroying the cq. Unlike flush_work,
cancel_work_sync protects against self-requeue of the
work item (which we can do in ib_cq_poll_work).

Signed-off-by: Sagi Grimberg <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>--
Reviewed-by: Leon Romanovsky <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
sagigrimberg authored and dledford committed Mar 24, 2017
1 parent 871a862 commit 86f46ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void ib_free_cq(struct ib_cq *cq)
irq_poll_disable(&cq->iop);
break;
case IB_POLL_WORKQUEUE:
flush_work(&cq->work);
cancel_work_sync(&cq->work);
break;
default:
WARN_ON_ONCE(1);
Expand Down

0 comments on commit 86f46ab

Please sign in to comment.