From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH, RFC 2/2] nvme: validate cntlid during controller initialisation
Date: Thu, 9 May 2019 08:16:50 +0200 [thread overview]
Message-ID: <20190509061650.GC15229@lst.de> (raw)
In-Reply-To: <SN6PR04MB45279ACEF3572C4F1F00ADF586320@SN6PR04MB4527.namprd04.prod.outlook.com>
On Wed, May 08, 2019@06:51:51PM +0000, Chaitanya Kulkarni wrote:
> > + list_for_each_entry(tmp, &subsys->ctrls, subsys_entry) {
> > + if (ctrl->state == NVME_CTRL_DELETING ||
> > + ctrl->state == NVME_CTRL_DEAD)
> nvme_change_ctrl_state() is using spinlock to protect the ctrl->state.
> Do we need to protect above check with the spinlock ?
There isn't really any point in taking a lock for doing a read of
a single value from a less than register sized field. As soon as we
drop the lock the value might change anyway.
next prev parent reply other threads:[~2019-05-09 6:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 7:55 [PATCH, RFC 1/2] nvme: change locking for the per-subsystem controller list Christoph Hellwig
2019-05-08 7:55 ` [PATCH, RFC 2/2] nvme: validate cntlid during controller initialisation Christoph Hellwig
2019-05-08 14:28 ` Keith Busch
2019-05-09 6:15 ` Christoph Hellwig
2019-05-08 18:51 ` Chaitanya Kulkarni
2019-05-09 6:16 ` Christoph Hellwig [this message]
2019-05-08 16:47 ` [PATCH, RFC 1/2] nvme: change locking for the per-subsystem controller list Edmund Nadolski
2019-05-09 6:17 ` Christoph Hellwig
2019-05-09 21:43 ` Edmund Nadolski
2019-05-08 22:42 ` Chaitanya Kulkarni
2019-05-09 5:13 ` Chaitanya Kulkarni
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=20190509061650.GC15229@lst.de \
--to=hch@lst.de \
/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.