Skip to content

Commit ceb1e08

Browse files
David MilburnChristoph Hellwig
authored andcommitted
nvme-tcp: cancel async events before freeing event struct
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>
1 parent 925dd04 commit ceb1e08

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,7 @@ static struct blk_mq_tag_set *nvme_tcp_alloc_tagset(struct nvme_ctrl *nctrl,
15971597
static void nvme_tcp_free_admin_queue(struct nvme_ctrl *ctrl)
15981598
{
15991599
if (to_tcp_ctrl(ctrl)->async_req.pdu) {
1600+
cancel_work_sync(&ctrl->async_event_work);
16001601
nvme_tcp_free_async_req(to_tcp_ctrl(ctrl));
16011602
to_tcp_ctrl(ctrl)->async_req.pdu = NULL;
16021603
}

0 commit comments

Comments
 (0)