All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-rdma: only clear queue flags after successful connect
@ 2016-09-21 20:02 Sagi Grimberg
  2016-09-21 20:04 ` Christoph Hellwig
  2016-09-23  0:12 ` Steve Wise
  0 siblings, 2 replies; 4+ messages in thread
From: Sagi Grimberg @ 2016-09-21 20:02 UTC (permalink / raw)


Otherwise, nvme_rdma_stop_and_clear_queue() will incorrectly
try to stop/free rdma qps/cm_ids that are already freed.

Fixes: e89ca58f9c90 ("nvme-rdma: add DELETING queue flag")
Reported-by: Steve Wise <swise at opengridcomputing.com>
Tested-by: Steve Wise <swise at opengridcomputing.com>
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
Jens, care to pick this last minute fix for rc8?
Thanks

 drivers/nvme/host/rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index c2c2c28e6eb5..fbdb2267e460 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -561,7 +561,6 @@ static int nvme_rdma_init_queue(struct nvme_rdma_ctrl *ctrl,
 
 	queue = &ctrl->queues[idx];
 	queue->ctrl = ctrl;
-	queue->flags = 0;
 	init_completion(&queue->cm_done);
 
 	if (idx > 0)
@@ -595,6 +594,7 @@ static int nvme_rdma_init_queue(struct nvme_rdma_ctrl *ctrl,
 		goto out_destroy_cm_id;
 	}
 
+	clear_bit(NVME_RDMA_Q_DELETING, &queue->flags);
 	set_bit(NVME_RDMA_Q_CONNECTED, &queue->flags);
 
 	return 0;
-- 
1.9.1

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

* [PATCH] nvme-rdma: only clear queue flags after successful connect
  2016-09-21 20:02 [PATCH] nvme-rdma: only clear queue flags after successful connect Sagi Grimberg
@ 2016-09-21 20:04 ` Christoph Hellwig
  2016-09-23  0:12 ` Steve Wise
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2016-09-21 20:04 UTC (permalink / raw)


Allright, looks fine now:

Reviewed-by: Christoph Hellwig <hch at lst.de>

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

* [PATCH] nvme-rdma: only clear queue flags after successful connect
  2016-09-21 20:02 [PATCH] nvme-rdma: only clear queue flags after successful connect Sagi Grimberg
  2016-09-21 20:04 ` Christoph Hellwig
@ 2016-09-23  0:12 ` Steve Wise
  2016-09-23  1:59   ` Jens Axboe
  1 sibling, 1 reply; 4+ messages in thread
From: Steve Wise @ 2016-09-23  0:12 UTC (permalink / raw)


> Otherwise, nvme_rdma_stop_and_clear_queue() will incorrectly
> try to stop/free rdma qps/cm_ids that are already freed.
> 
> Fixes: e89ca58f9c90 ("nvme-rdma: add DELETING queue flag")
> Reported-by: Steve Wise <swise at opengridcomputing.com>
> Tested-by: Steve Wise <swise at opengridcomputing.com>
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
> Jens, care to pick this last minute fix for rc8?

It would be great to get this rc8 to avoid the crash on reconnect
timeouts...

Steve.

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

* [PATCH] nvme-rdma: only clear queue flags after successful connect
  2016-09-23  0:12 ` Steve Wise
@ 2016-09-23  1:59   ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2016-09-23  1:59 UTC (permalink / raw)


On 09/22/2016 06:12 PM, Steve Wise wrote:
>> Otherwise, nvme_rdma_stop_and_clear_queue() will incorrectly
>> try to stop/free rdma qps/cm_ids that are already freed.
>>
>> Fixes: e89ca58f9c90 ("nvme-rdma: add DELETING queue flag")
>> Reported-by: Steve Wise <swise at opengridcomputing.com>
>> Tested-by: Steve Wise <swise at opengridcomputing.com>
>> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
>> ---
>> Jens, care to pick this last minute fix for rc8?
>
> It would be great to get this rc8 to avoid the crash on reconnect
> timeouts...

Added, I'll push out the last fixes tomorrow for 4.8, thanks.

-- 
Jens Axboe

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

end of thread, other threads:[~2016-09-23  1:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 20:02 [PATCH] nvme-rdma: only clear queue flags after successful connect Sagi Grimberg
2016-09-21 20:04 ` Christoph Hellwig
2016-09-23  0:12 ` Steve Wise
2016-09-23  1:59   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.