All of lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH 2/2] nvme: Don't use a stack buffer for keep-alive command
Date: Sun, 14 Jan 2018 11:31:40 +0200	[thread overview]
Message-ID: <76436c6a-5dee-b174-3b39-2735f8dc3a05@grimberg.me> (raw)
In-Reply-To: <20180111213815.2107-1-roland@kernel.org>


> From: Roland Dreier <roland at purestorage.com>
> 
> In nvme_keep_alive() we pass a request with a pointer to an NVMe command on
> the stack into blk_execute_rq_nowait().  However, the block layer doesn't
> guarantee that the request is fully queued before blk_execute_rq_nowait()
> returns.  If not, and the request is queued after nvme_keep_alive() returns,
> then we'll end up using stack memory that might have been overwritten to
> form the NVMe command we pass to hardware.
> 
> Fix this by keeping a special command struct in the nvme_ctrl struct right
> next to the delayed work struct used for keep-alives.

Thanks Roland,

Reviewed-by: Sagi Grimberg <sagi at grimberg.me>

  reply	other threads:[~2018-01-14  9:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 21:38 [PATCH 2/2] nvme: Don't use a stack buffer for keep-alive command Roland Dreier
2018-01-14  9:31 ` Sagi Grimberg [this message]
2018-01-15  8:42   ` Christoph Hellwig
     [not found]     ` <CAG4TOxOtFqM-RAdS_r1hsPVuru_=abDtTUmB=XqGFaanBrqbEQ@mail.gmail.com>
2018-01-19 19:12       ` Christoph Hellwig
2018-02-08 15:59     ` Keith Busch
2018-02-08 16:02       ` Sagi Grimberg
2018-02-08 16:16         ` Keith Busch
2018-02-08 16:26         ` Keith Busch
2018-02-12 19:39           ` Sagi Grimberg
2018-02-12 20:07             ` 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=76436c6a-5dee-b174-3b39-2735f8dc3a05@grimberg.me \
    --to=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.