Commit 86f46aba authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Doug Ledford

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: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>--
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 871a8623
...@@ -196,7 +196,7 @@ void ib_free_cq(struct ib_cq *cq) ...@@ -196,7 +196,7 @@ void ib_free_cq(struct ib_cq *cq)
irq_poll_disable(&cq->iop); irq_poll_disable(&cq->iop);
break; break;
case IB_POLL_WORKQUEUE: case IB_POLL_WORKQUEUE:
flush_work(&cq->work); cancel_work_sync(&cq->work);
break; break;
default: default:
WARN_ON_ONCE(1); WARN_ON_ONCE(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment