Skip to content

Commit 5dec8fe

Browse files
David Milburngregkh
authored andcommitted
nvme-tcp: cancel async events before freeing event struct
[ Upstream commit ceb1e08 ] Cancel async event work in case async event has been queued up, and nvme_tcp_submit_async_event() runs after event has been freed. Signed-off-by: David Milburn <dmilburn@redhat.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 64e977c commit 5dec8fe

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/nvme/host/tcp.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,7 @@ static struct blk_mq_tag_set *nvme_tcp_alloc_tagset(struct nvme_ctrl *nctrl,
15671567
static void nvme_tcp_free_admin_queue(struct nvme_ctrl *ctrl)
15681568
{
15691569
if (to_tcp_ctrl(ctrl)->async_req.pdu) {
1570+
cancel_work_sync(&ctrl->async_event_work);
15701571
nvme_tcp_free_async_req(to_tcp_ctrl(ctrl));
15711572
to_tcp_ctrl(ctrl)->async_req.pdu = NULL;
15721573
}

0 commit comments

Comments
 (0)