From: Christoph Hellwig <hch@infradead.org>
To: Prabhath Sajeepa <psajeepa@purestorage.com>
Cc: roland@purestorage.com, sagi@grimberg.me,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
axboe@fb.com, kbusch@kernel.org, hch@lst.de
Subject: Re: [PATCH] nvme-rdma: Avoid double freeing of async event data
Date: Tue, 10 Mar 2020 10:53:28 -0700 [thread overview]
Message-ID: <20200310175328.GA9203@infradead.org> (raw)
In-Reply-To: <1583788073-39681-1-git-send-email-psajeepa@purestorage.com>
On Mon, Mar 09, 2020 at 03:07:53PM -0600, Prabhath Sajeepa wrote:
> The timeout of identify cmd, which is invoked as part of admin queue
> creation, can result in freeing of async event data both in
> nvme_rdma_timeout handler and error handling path of
> nvme_rdma_configure_admin queue thus causing NULL pointer reference.
> Call Trace:
> ? nvme_rdma_setup_ctrl+0x223/0x800 [nvme_rdma]
> nvme_rdma_create_ctrl+0x2ba/0x3f7 [nvme_rdma]
> nvmf_dev_write+0xa54/0xcc6 [nvme_fabrics]
> __vfs_write+0x1b/0x40
> vfs_write+0xb2/0x1b0
> ksys_write+0x61/0xd0
> __x64_sys_write+0x1a/0x20
> do_syscall_64+0x60/0x1e0
> entry_SYSCALL_64_after_hwframe+0x44/0xa9
>
> Signed-off-by: Prabhath Sajeepa <psajeepa@purestorage.com>
> Reviewed-by: Roland Dreier <roland@purestorage.com>
This looks good as a hot fix:
Reviewed-by: Christoph Hellwig <hch@lst.de>
But I really think we need to do something about init vs timeout
in the state machine. Otherwise we're going to deal with racing
resource deallocation forever.
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-03-10 17:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 21:07 [PATCH] nvme-rdma: Avoid double freeing of async event data Prabhath Sajeepa
2020-03-09 21:53 ` Max Gurtovoy
2020-03-10 17:53 ` Christoph Hellwig [this message]
2020-03-10 20:59 ` Keith Busch
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=20200310175328.GA9203@infradead.org \
--to=hch@infradead.org \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=psajeepa@purestorage.com \
--cc=roland@purestorage.com \
--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