From: Israel Rukshin <israelr@nvidia.com>
To: Chao Leng <lengchao@huawei.com>, <linux-nvme@lists.infradead.org>
Cc: kbusch@kernel.org, axboe@fb.com, hch@lst.de, sagi@grimberg.me
Subject: Re: [PATCH v2 1/2] nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout
Date: Thu, 14 Jan 2021 18:34:24 +0200 [thread overview]
Message-ID: <ab0a9be7-778a-4fdb-4bd3-cad6c76534e4@nvidia.com> (raw)
In-Reply-To: <20210114090926.12109-2-lengchao@huawei.com>
On 1/14/2021 11:09 AM, Chao Leng wrote:
> A crash happens when inject completing request long time(nearly 30s).
> Each name space has a request queue, when inject completing request long
> time, multi request queues may have time out requests at the same time,
> nvme_rdma_timeout will execute concurrently. Multi requests in different
> request queues may be queued in the same rdma queue, multi
> nvme_rdma_timeout may call nvme_rdma_stop_queue at the same time.
> The first nvme_rdma_timeout will clear NVME_RDMA_Q_LIVE and continue
> stopping the rdma queue(drain qp), but the others check NVME_RDMA_Q_LIVE
> is already cleared, and then directly complete the requests, complete
> request before the qp is fully drained may lead to a use-after-free
> condition.
>
> Add a multex lock to serialize nvme_rdma_stop_queue.
Looks good to me.
I tested this patch at our regression.
Tested-by: Israel Rukshin <israelr@nvidia.com>
Reviewed-by: Israel Rukshin <israelr@nvidia.com>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-01-14 16:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 9:09 [PATCH v2 0/2] avoid request double completion for concurrent nvme_rdma(tcp)_timeout Chao Leng
2021-01-14 9:09 ` [PATCH v2 1/2] nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout Chao Leng
2021-01-14 16:34 ` Israel Rukshin [this message]
2021-01-14 9:09 ` [PATCH v2 2/2] nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout Chao Leng
2021-01-18 17:59 ` [PATCH v2 0/2] avoid request double completion for concurrent nvme_rdma(tcp)_timeout Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab0a9be7-778a-4fdb-4bd3-cad6c76534e4@nvidia.com \
--to=israelr@nvidia.com \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=lengchao@huawei.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox