IB/core: Protect against self-requeue of a cq work item
Subsystems (2)
Sagi Grimberg
maintainerPATCH 1/1 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).
--- drivers/infiniband/core/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/cq.c +1 -1
@@ -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 );
Signature · 1 line
2.7.4
Christoph Hellwig
maintainerPATCH 1/1 IB/core: Protect against self-requeue of a cq work item
Looks good,
PATCH 1/1 IB/core: Protect against self-requeue of a cq work item
In reply to Sagi GrimbergQuoted 4 lines · Sagi Grimberg
We need to make sure that the cq work item does not run when we are destroying the cq. Unlike
flush_work,cancel_work_syncprotects against self-requeue of the work item (which we can do inib_cq_poll_work).
PATCH 1/1 IB/core: Protect against self-requeue of a cq work item
In reply to Sagi GrimbergQuoted 7 lines · Sagi Grimberg
We need to make sure that the cq work item does not run when we are destroying the cq. Unlike
flush_work,cancel_work_syncprotects against self-requeue of the work item (which we can do inib_cq_poll_work).Signed-off-by Sagi Grimberg <sagi at grimberg.me>---
Thanks,
Reviewed-by: Leon Romanovsky <leonro at mellanox.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20170312/b1a2a558/attachment.sig>
PATCH 1/1 IB/core: Protect against self-requeue of a cq work item
In reply to Sagi GrimbergQuoted 6 lines · Sagi Grimberg
We need to make sure that the cq work item does not run when we are destroying the cq. Unlike
flush_work,cancel_work_syncprotects against self-requeue of the work item (which we can do inib_cq_poll_work).Signed-off-by Sagi Grimberg <sagi at grimberg.me>
Hi Sagi, I didn't know if this was a theoretical or you actually hit this in practice, so I pulled it for -rc in case it was actually being hit in the wild. ?Thanks.
Signature · 4 lines
Doug Ledford <dledford at redhat.com> ? ? GPG KeyID: B826A3330E572FDD ? ? Key fingerprint = AE6B 1BDA 122B 23B4 265B ?1274 B826 A333 0E57 2FDD