linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-fabrics: fix crash for no IO queues
@ 2021-03-04  0:55 Chao Leng
  2021-03-05 20:58 ` Sagi Grimberg
  0 siblings, 1 reply; 12+ messages in thread
From: Chao Leng @ 2021-03-04  0:55 UTC (permalink / raw)
  To: linux-nvme; +Cc: kbusch, axboe, hch, sagi, lengchao

A crash happens when set feature(NVME_FEAT_NUM_QUEUES) timeout in nvme
over rdma(roce) reconnection, the reason is use the queue which is not
alloced.

If queue is not live, should not allow queue request.

Signed-off-by: Chao Leng <lengchao@huawei.com>
---
 drivers/nvme/host/fabrics.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index 733010d2eafd..2479744fc349 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -189,7 +189,7 @@ static inline bool nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
 {
 	if (likely(ctrl->state == NVME_CTRL_LIVE ||
 		   ctrl->state == NVME_CTRL_DELETING))
-		return true;
+		return queue_live;
 	return __nvmf_check_ready(ctrl, rq, queue_live);
 }
 
-- 
2.16.4


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

^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH] nvme-fabrics: fix crash for no IO queues
@ 2021-03-03  2:53 Chao Leng
  0 siblings, 0 replies; 12+ messages in thread
From: Chao Leng @ 2021-03-03  2:53 UTC (permalink / raw)
  To: linux-nvme; +Cc: kbusch, axboe, hch, sagi

A crash happens when set feature(NVME_FEAT_NUM_QUEUES) timeout in nvme
over rdma(roce) reconnection, the reason is use the queue which is not
alloced.

If queue is not live, should not allow queue request.

Signed-off-by: Chao Leng <lengchao@huawei.com>
---
 drivers/nvme/host/fabrics.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index 733010d2eafd..2479744fc349 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -189,7 +189,7 @@ static inline bool nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
 {
 	if (likely(ctrl->state == NVME_CTRL_LIVE ||
 		   ctrl->state == NVME_CTRL_DELETING))
-		return true;
+		return queue_live;
 	return __nvmf_check_ready(ctrl, rq, queue_live);
 }
 
-- 
2.16.4


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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-03-17  0:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04  0:55 [PATCH] nvme-fabrics: fix crash for no IO queues Chao Leng
2021-03-05 20:58 ` Sagi Grimberg
2021-03-08  1:30   ` Chao Leng
2021-03-15 17:08     ` Sagi Grimberg
2021-03-16  1:23       ` Chao Leng
2021-03-16  2:02         ` Keith Busch
2021-03-16  5:08           ` Sagi Grimberg
2021-03-16 20:57             ` James Smart
2021-03-16 21:25               ` Keith Busch
2021-03-16 23:52                 ` Sagi Grimberg
2021-03-17  0:19                 ` James Smart
  -- strict thread matches above, loose matches on Subject: below --
2021-03-03  2:53 Chao Leng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).