linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
Subject: nvmet: race condition while CQE are getting processed concurrently with the DISCONNECTED event
Date: Wed, 8 Mar 2017 07:46:05 -0800	[thread overview]
Message-ID: <20170308154605.GA28937@infradead.org> (raw)
In-Reply-To: <7dc99796-899e-b1a0-6ddb-cbfc497195dd@grimberg.me>

On Tue, Mar 07, 2017@03:33:27PM +0200, Sagi Grimberg wrote:
> 1. nvmet_sq_destroy is not doing its job for completing all
>    its inflight requests. Although we do wait for the final
>    ref on the nvmet_sq to drop to zero.

> For that perhaps you can try patch [1].

Yes, I'll think we need that.  Did I mention that the percpu
refounter API is a complete trainwreck a couple times? :)

> 2. ib_destroy_cq does not really protect against a case where
>    the work requeue itself because it runs flush_work(). In this
>    case when the work re-executes it polls a cq array that is
>    already freed and sees a bogus successful completion. Perhaps
>    ib_free_cq should run cancel_work_sync() instead? see [2].

Yeah, we'll probably need that as well.  Independent of it solves
the problem reported here.

  reply	other threads:[~2017-03-08 15:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CY1PR12MB077418C35F6EA2499CBACA45BC2C0@CY1PR12MB0774.namprd12.prod.outlook.com>
2017-03-07 13:33 ` nvmet: race condition while CQE are getting processed concurrently with the DISCONNECTED event Sagi Grimberg
2017-03-08 15:46   ` Christoph Hellwig [this message]
2017-03-08 19:34     ` Sagi Grimberg
     [not found] <CY1PR12MB07747089AFFCB6115BBCF5ECBC210@CY1PR12MB0774.namprd12.prod.outlook.com>
2017-03-09 11:45 ` Sagi Grimberg
2017-03-11  8:29   ` Raju  Rangoju
2017-03-13  2:22   ` Yi Zhang
2017-03-13  8:05     ` Sagi Grimberg
2017-03-14 13:22       ` Yi Zhang

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=20170308154605.GA28937@infradead.org \
    --to=hch@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).