From: swise@opengridcomputing.com (Steve Wise)
Subject: [PATCH] nvme: Prevent controller state invalid transition
Date: Mon, 15 Aug 2016 10:17:25 -0500 [thread overview]
Message-ID: <01c801d1f708$20df28f0$629d7ad0$@opengridcomputing.com> (raw)
In-Reply-To: <1469819718-25511-1-git-send-email-krisman@linux.vnet.ibm.com>
>
> Acquiring the nvme_ctrl lock before reading ctrl->state in
> nvme_change_ctrl_state() should prevent a theoretical invalid state
> transition, in the event of two threads racing inside that function.
>
> I haven't been able to observe this happening with the current code, and
> the current state machine seems to be simple enough to not be
> affected by these invalid transitions, but future modifications could
> make it more likely to happen.
>
> Signed-off-by: Gabriel Krisman Bertazi <krisman at linux.vnet.ibm.com>
Looks correct.
Reviewed-by: Steve Wise <swise at opengridcomputing.com>
next prev parent reply other threads:[~2016-08-15 15:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 19:15 [PATCH] nvme: Prevent controller state invalid transition Gabriel Krisman Bertazi
2016-08-01 11:13 ` Sagi Grimberg
2016-08-15 15:17 ` Steve Wise [this message]
2016-08-15 15:47 ` Jens Axboe
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='01c801d1f708$20df28f0$629d7ad0$@opengridcomputing.com' \
--to=swise@opengridcomputing.com \
/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).