lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 Sep 2021 13:54:04 +0000
From:   Himanshu Madhani <himanshu.madhani@...cle.com>
To:     Daniel Wagner <dwagner@...e.de>
CC:     "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        open list <linux-kernel@...r.kernel.org>,
        Hannes Reinecke <hare@...e.de>,
        Sagi Grimberg <sagi@...mberg.me>,
        Keith Busch <kbusch@...nel.org>,
        Ming Lei <ming.lei@...hat.com>,
        Wen Xiong <wenxiong@...ibm.com>,
        James Smart <jsmart2021@...il.com>,
        Chao Leng <lengchao@...wei.com>
Subject: Re: [PATCH v7 2/3] nvme-fc: avoid race between time out and tear down



> On Sep 14, 2021, at 4:20 AM, Daniel Wagner <dwagner@...e.de> wrote:
> 
> From: James Smart <jsmart2021@...il.com>
> 
> To avoid race between time out and tear down, in tear down process,
> first we quiesce the queue, and then delete the timer and cancel
> the time out work for the queue.
> 
> This patch merges the admin and io sync ops into the queue teardown logic
> as shown in the RDMA patch 3017013dcc "nvme-rdma: avoid race between time
> out and tear down". There is no teardown_lock in nvme-fc.
> 
> Signed-off-by: James Smart <jsmart2021@...il.com>
> CC: Chao Leng <lengchao@...wei.com>
> Tested-by: Daniel Wagner <dwagner@...e.de>
> Reviewed-by: Daniel Wagner <dwagner@...e.de>
> Reviewed-by: Hannes Reinecke <hare@...e.de>
> ---
> drivers/nvme/host/fc.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index b5d9a5507de5..6ebe68396712 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2487,6 +2487,7 @@ __nvme_fc_abort_outstanding_ios(struct nvme_fc_ctrl *ctrl, bool start_queues)
> 	 */
> 	if (ctrl->ctrl.queue_count > 1) {
> 		nvme_stop_queues(&ctrl->ctrl);
> +		nvme_sync_io_queues(&ctrl->ctrl);
> 		blk_mq_tagset_busy_iter(&ctrl->tag_set,
> 				nvme_fc_terminate_exchange, &ctrl->ctrl);
> 		blk_mq_tagset_wait_completed_request(&ctrl->tag_set);
> @@ -2510,6 +2511,7 @@ __nvme_fc_abort_outstanding_ios(struct nvme_fc_ctrl *ctrl, bool start_queues)
> 	 * clean up the admin queue. Same thing as above.
> 	 */
> 	blk_mq_quiesce_queue(ctrl->ctrl.admin_q);
> +	blk_sync_queue(ctrl->ctrl.admin_q);
> 	blk_mq_tagset_busy_iter(&ctrl->admin_tag_set,
> 				nvme_fc_terminate_exchange, &ctrl->ctrl);
> 	blk_mq_tagset_wait_completed_request(&ctrl->admin_tag_set);
> -- 
> 2.29.2
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@...cle.com>

--
Himanshu Madhani	 Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ