From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH] nvme-fabrics: get ctrl reference in nvmf_dev_write
Date: Wed, 13 Jul 2016 04:18:31 +0200 [thread overview]
Message-ID: <20160713021831.GA7782@lst.de> (raw)
In-Reply-To: <1468363122-11073-1-git-send-email-mlin@kernel.org>
On Tue, Jul 12, 2016@03:38:42PM -0700, Ming Lin wrote:
> From: Ming Lin <ming.l at samsung.com>
>
> Below crash was triggered when shutting down a nvme host node
> via 'reboot' that has 1 target device attached.
>
> That's because nvmf_dev_release() put the ctrl reference, but
> we didn't get the reference in nvmf_dev_write().
>
> So the ctrl was freed in nvme_rdma_free_ctrl() before nvme_rdma_free_ring()
> was called.
The ->create_ctrl methods do a kref_init for the main refererence,
and a kref_get for the reference that nvmf_dev_release drops,
so I'm a bit confused how this case could happen. I think we'll need to
dig a bit deeper on what's actually happening here.
next prev parent reply other threads:[~2016-07-13 2:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 22:38 [PATCH] nvme-fabrics: get ctrl reference in nvmf_dev_write Ming Lin
2016-07-13 2:18 ` Christoph Hellwig [this message]
2016-07-13 6:54 ` Ming Lin
2016-07-13 14:45 ` Steve Wise
2016-07-13 15:01 ` Ming Lin
2016-07-13 15:06 ` Steve Wise
[not found] ` <57862150.6070304@grimberg.me>
2016-07-13 15:03 ` Sagi Grimberg
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=20160713021831.GA7782@lst.de \
--to=hch@lst.de \
/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).