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] [day] [month] [year] [list]
Date:   Thu, 3 May 2018 09:31:42 -0600
From:   Keith Busch <keith.busch@...ux.intel.com>
To:     Johannes Thumshirn <jthumshirn@...e.de>
Cc:     Keith Busch <keith.busch@...el.com>,
        Sagi Grimberg <sagi@...mberg.me>,
        James Smart <james.smart@...adcom.com>,
        Linux NVMe Mailinglist <linux-nvme@...ts.infradead.org>,
        Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] nvmet: switch loopback target state to connecting when
 resetting

On Thu, May 03, 2018 at 05:00:35PM +0200, Johannes Thumshirn wrote:
> After commit bb06ec31452f ("nvme: expand nvmf_check_if_ready checks")
> resetting of the loopback nvme target failed as we forgot to switch
> it's state to NVME_CTRL_CONNECTING before we reconnect the admin
> queues. Therefore the checks in nvmf_check_if_ready() choose to go to
> the reject_io case and thus we couldn't sent out an identify
> controller command to reconnect.
> 
> Change the controller state to NVME_CTRL_CONNECTING after tearing down
> the old connection and before re-establishing the connection.
> 
> Fixes: bb06ec31452f ("nvme: expand nvmf_check_if_ready checks")
> Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
> ---
>  drivers/nvme/target/loop.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
> index 31fdfba556a8..27a8561c0cb9 100644
> --- a/drivers/nvme/target/loop.c
> +++ b/drivers/nvme/target/loop.c
> @@ -469,6 +469,12 @@ static void nvme_loop_reset_ctrl_work(struct work_struct *work)
>  	nvme_stop_ctrl(&ctrl->ctrl);
>  	nvme_loop_shutdown_ctrl(ctrl);
>  
> +	if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
> +		/* state change failure should never happen */
> +		WARN_ON_ONCE(1);
> +		return;
> +	}
> +
>  	ret = nvme_loop_configure_admin_queue(ctrl);
>  	if (ret)
>  		goto out_disable;
> -- 
> 2.16.3

Thanks, applied to the 4.17 nvme branch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ