1
0
Fork 0

IB/core: Protect against self-requeue of a cq work item

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 <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>--
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
hifive-unleashed-5.1
Sagi Grimberg 2017-03-08 22:00:52 +02:00 committed by Doug Ledford
parent 871a8623d3
commit 86f46aba8d
1 changed files with 1 additions and 1 deletions

View File

@ -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);