nvme-rdma corrupts memory upon timeout

Bart Van Assche bart.vanassche at wdc.com
Mon Feb 26 10:50:11 PST 2018


On 02/25/18 10:14, Sagi Grimberg wrote:
> Or maybe this should do a better job:
> -- 
> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
> index 4c32518a6c81..e45801fe78c1 100644
> --- a/drivers/nvme/host/rdma.c
> +++ b/drivers/nvme/host/rdma.c
> @@ -956,12 +956,14 @@ static void nvme_rdma_error_recovery_work(struct 
> work_struct *work)
> 
>          if (ctrl->ctrl.queue_count > 1) {
>                  nvme_stop_queues(&ctrl->ctrl);
> +               nvme_rdma_stop_io_queues(ctrl);
>                  blk_mq_tagset_busy_iter(&ctrl->tag_set,
>                                          nvme_cancel_request, &ctrl->ctrl);
>                  nvme_rdma_destroy_io_queues(ctrl, false);
>          }
> 
>          blk_mq_quiesce_queue(ctrl->ctrl.admin_q);
> +       nvme_rdma_stop_queue(&ctrl->queues[0]);
>          blk_mq_tagset_busy_iter(&ctrl->admin_tag_set,
>                                  nvme_cancel_request, &ctrl->ctrl);
>          nvme_rdma_destroy_admin_queue(ctrl, false);
> @@ -1729,9 +1731,12 @@ static void nvme_rdma_shutdown_ctrl(struct 
> nvme_rdma_ctrl *ctrl, bool shutdown)
> 
>          if (ctrl->ctrl.queue_count > 1) {
>                  nvme_stop_queues(&ctrl->ctrl);
> +               nvme_rdma_stop_io_queues(ctrl);
>                  blk_mq_tagset_busy_iter(&ctrl->tag_set,
>                                          nvme_cancel_request, &ctrl->ctrl);
>                  nvme_rdma_destroy_io_queues(ctrl, shutdown);
> +               if (shutdown)
> +                       nvme_start_queues(&ctrl->ctrl);
>          }
> 
>          if (shutdown)
> @@ -1740,10 +1745,11 @@ static void nvme_rdma_shutdown_ctrl(struct 
> nvme_rdma_ctrl *ctrl, bool shutdown)
>                  nvme_disable_ctrl(&ctrl->ctrl, ctrl->ctrl.cap);
> 
>          blk_mq_quiesce_queue(ctrl->ctrl.admin_q);
> +       nvme_rdma_stop_queue(&ctrl->queues[0]);
>          blk_mq_tagset_busy_iter(&ctrl->admin_tag_set,
>                                  nvme_cancel_request, &ctrl->ctrl);
> -       blk_mq_unquiesce_queue(ctrl->ctrl.admin_q);
>          nvme_rdma_destroy_admin_queue(ctrl, shutdown);
> +       blk_mq_unquiesce_queue(ctrl->ctrl.admin_q);
>   }
> 
>   static void nvme_rdma_delete_ctrl(struct nvme_ctrl *ctrl)

Hello Sagi,

Can you resend this patch using e-mail software that does not corrupt a 
patch? All tabs in your patch have been changed into 8 high-ASCII spaces 
(ASCII code 160).

Thanks,

Bart.



More information about the Linux-nvme mailing list