Pull single NVMe fix from Christoph. * 'nvme-4.18' of git://git.infradead.org/nvme: nvme-rdma: fix possible double free of controller async event buffer
Unified · Split
| @@ -732,8 +732,11 @@ static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl, · 731 unmodified lines | ||
| 732 | 732 | blk_cleanup_queue(ctrl->ctrl.admin_q); |
| 733 | 733 | nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.admin_tagset); |
| 734 | 734 | } |
| 735 | − nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, | |
| 736 | − sizeof(struct nvme_command), DMA_TO_DEVICE); | |
| 735 | + if (ctrl->async_event_sqe.data) { | |
| 736 | + nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, | |
| 737 | + sizeof(struct nvme_command), DMA_TO_DEVICE); | |
| 738 | + ctrl->async_event_sqe.data = NULL; | |
| 739 | + } | |
| 737 | 740 | nvme_rdma_free_queue(&ctrl->queues[0]); |
| 738 | 741 | } |
| 739 | 742 | |