All of lore.kernel.org
 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: Wed, 2 Feb 2022 09:18:59 +0100	[thread overview]
Message-ID: <20220202081859.GA18942@lst.de> (raw)
In-Reply-To: <59c5afdf-c7c8-58ea-90d0-83b8edb5b4cb@grimberg.me>

On Tue, Feb 01, 2022 at 05:25:02PM +0200, Sagi Grimberg wrote:
>
>> 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.
>
> I sent a v2 already. You want me to send a v3 with something like:

I've added the comment manually and applied the v2 series, thanks!


  reply	other threads:[~2022-02-02  8:19 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
2022-02-01 15:25         ` Sagi Grimberg
2022-02-02  8:18           ` Christoph Hellwig [this message]
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=20220202081859.GA18942@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.