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, 7 Aug 2018 22:49:47 +0000
From:   Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>
To:     Tal Shorer <tal.shorer@...il.com>,
        "keith.busch@...el.com" <keith.busch@...el.com>,
        "axboe@...com" <axboe@...com>, "hch@....de" <hch@....de>,
        "sagi@...mberg.me" <sagi@...mberg.me>,
        "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nvme: fabrics: fix ctrl_loss_tmo < 0 to reconnect forever

Looks good to me.

Just 's/supplics/supplies/'.

Without looking into the entire code, If we can change the type of max_reconnect and nr_reconnects to unsigned int then we can just get away with the one comparison (ctrl->nr_reconnects < ctrl->opts->max_reconnects).

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>


From: Linux-nvme <linux-nvme-bounces@...ts.infradead.org> on behalf of Tal Shorer <tal.shorer@...il.com>
Sent: Tuesday, August 7, 2018 1:42 PM
To: keith.busch@...el.com; axboe@...com; hch@....de; sagi@...mberg.me; linux-nvme@...ts.infradead.org; linux-kernel@...r.kernel.org
Cc: Tal Shorer
Subject: [PATCH] nvme: fabrics: fix ctrl_loss_tmo < 0 to reconnect forever
  
 
When the user supplics ctrl_loss_tmo < 0, we warn them that this will
cause the fabrics layer to attempt reconnection forever.
However, in reality the fabrics layer never attempts to reconnect
because the condition to test whether we should reconnect is backwards
in this case.

Signed-off-by: Tal Shorer <tal.shorer@...il.com>
---
 drivers/nvme/host/fabrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index f7efe5a58cc7..206d63cb1afc 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -474,7 +474,7 @@ EXPORT_SYMBOL_GPL(nvmf_connect_io_queue);
 
 bool nvmf_should_reconnect(struct nvme_ctrl *ctrl)
 {
-       if (ctrl->opts->max_reconnects != -1 &&
+       if (ctrl->opts->max_reconnects == -1 ||
             ctrl->nr_reconnects < ctrl->opts->max_reconnects)
                 return true;
 
-- 
2.14.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@...ts.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
    

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ