linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org, Keith Busch <kbusch@kernel.org>,
	Chris Leech <cleech@redhat.com>
Subject: Re: [PATCH 1/4] nvme-tcp: fix a possible use-after-free in controller reset during load
Date: Tue, 1 Feb 2022 14:58:41 +0100	[thread overview]
Message-ID: <20220201135841.GA2518@lst.de> (raw)
In-Reply-To: <654808ec-81e9-0205-779b-7502ee6c5b0a@grimberg.me>

On Tue, Feb 01, 2022 at 02:36:03PM +0200, Sagi Grimberg wrote:
> The driver will make sure to flush ctrl->async_event_work _after_
> changing the controller state (it is flushed in nvme_stop_ctrl).
> Only after that it will continue to free the admin queue. So if
> this check passed, it is safe to submit the aer command.
>
> I think that the ctrl->state check should be sufficient. In fact, I
> think we can move it to the core instead of doing it in the drivers:

Maybe through in a comment explaining this?  Otherwise having less
checks and having them in the core is always a good thing, so I'm
in favour.


  reply	other threads:[~2022-02-01 13:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30  9:21 [PATCH 0/4] nvme-[tcp|rdma] fix for possible use-after-free Sagi Grimberg
2022-01-30  9:21 ` [PATCH 1/4] nvme-tcp: fix a possible use-after-free in controller reset during load Sagi Grimberg
2022-02-01  8:03   ` Christoph Hellwig
2022-02-01 12:36     ` Sagi Grimberg
2022-02-01 13:58       ` Christoph Hellwig [this message]
2022-02-01 15:25         ` Sagi Grimberg
2022-02-02  8:18           ` Christoph Hellwig
2022-01-30  9:21 ` [PATCH 2/4] nvme-tcp: fix possible use-after-free in transport error_recovery work Sagi Grimberg
2022-01-30  9:21 ` [PATCH 3/4] nvme-rdma: fix a possible use-after-free in controller reset during load Sagi Grimberg
2022-02-01  8:03   ` Christoph Hellwig
2022-01-30  9:21 ` [PATCH 4/4] nvme-rdma: fix possible use-after-free in transport error_recovery work 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=20220201135841.GA2518@lst.de \
    --to=hch@lst.de \
    --cc=cleech@redhat.com \
    --cc=kbusch@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).