All of lore.kernel.org
 help / color / mirror / Atom feed
From: mrybczyn@kalray.eu (Marta Rybczynska)
Subject: [PATCH 1/3] PCI: ensure the PCI device is locked over ->reset_notify calls
Date: Tue, 6 Jun 2017 09:28:36 +0200 (CEST)	[thread overview]
Message-ID: <1383840912.76088794.1496734116252.JavaMail.zimbra@kalray.eu> (raw)
In-Reply-To: <20170606053142.GA25064@bhelgaas-glaptop.roam.corp.google.com>

> 
> But I'm still nervous because I think both threads will queue
> nvme_reset_work() work items for the same device, and I'm not sure
> they're prepared to run concurrently.
> 
> I don't really think it should be the driver's responsibility to
> understand issues like this and worry about things like
> nvme_reset_work() running concurrently.  So I'm thinking maybe the PCI
> core needs to be a little stricter here, but I don't know exactly
> *how*.
> 
> What do you think?

>From what I can see the nvme_reset_work if run twice may disable the
controller (the out label) if run concurrently. If run twice it will
initialize twice what isn't best either.

I think that the double nvme_reset_work should be prevented. Maybe
a state information saying that the device is in the reset procedure
and after that run nvme_reset_work just once?

Marta

WARNING: multiple messages have this Message-ID (diff)
From: Marta Rybczynska <mrybczyn@kalray.eu>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	rakesh@tuxera.com, linux-nvme@lists.infradead.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/3] PCI: ensure the PCI device is locked over ->reset_notify calls
Date: Tue, 6 Jun 2017 09:28:36 +0200 (CEST)	[thread overview]
Message-ID: <1383840912.76088794.1496734116252.JavaMail.zimbra@kalray.eu> (raw)
In-Reply-To: <20170606053142.GA25064@bhelgaas-glaptop.roam.corp.google.com>

> 
> But I'm still nervous because I think both threads will queue
> nvme_reset_work() work items for the same device, and I'm not sure
> they're prepared to run concurrently.
> 
> I don't really think it should be the driver's responsibility to
> understand issues like this and worry about things like
> nvme_reset_work() running concurrently.  So I'm thinking maybe the PCI
> core needs to be a little stricter here, but I don't know exactly
> *how*.
> 
> What do you think?

>From what I can see the nvme_reset_work if run twice may disable the
controller (the out label) if run concurrently. If run twice it will
initialize twice what isn't best either.

I think that the double nvme_reset_work should be prevented. Maybe
a state information saying that the device is in the reset procedure
and after that run nvme_reset_work just once?

Marta

  reply	other threads:[~2017-06-06  7:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 11:10 avoid null pointer rereference during FLR V2 Christoph Hellwig
2017-06-01 11:10 ` Christoph Hellwig
2017-06-01 11:10 ` [PATCH 1/3] PCI: ensure the PCI device is locked over ->reset_notify calls Christoph Hellwig
2017-06-01 11:10   ` Christoph Hellwig
2017-06-06  5:31   ` Bjorn Helgaas
2017-06-06  5:31     ` Bjorn Helgaas
2017-06-06  7:28     ` Marta Rybczynska [this message]
2017-06-06  7:28       ` Marta Rybczynska
2017-06-06 10:48     ` Christoph Hellwig
2017-06-06 10:48       ` Christoph Hellwig
2017-06-06 21:14       ` Bjorn Helgaas
2017-06-06 21:14         ` Bjorn Helgaas
2017-06-07 18:29         ` Christoph Hellwig
2017-06-07 18:29           ` Christoph Hellwig
2017-06-12 23:14           ` Bjorn Helgaas
2017-06-12 23:14             ` Bjorn Helgaas
2017-06-13  7:08             ` Christoph Hellwig
2017-06-13  7:08               ` Christoph Hellwig
2017-06-13 14:05               ` Bjorn Helgaas
2017-06-13 14:05                 ` Bjorn Helgaas
2017-06-22 20:41             ` Guilherme G. Piccoli
2017-06-22 20:41               ` Guilherme G. Piccoli
2017-06-01 11:10 ` [PATCH 2/3] PCI: split reset_notify method Christoph Hellwig
2017-06-01 11:10   ` Christoph Hellwig
2017-06-01 11:10 ` [PATCH 3/3] PCI: remove __pci_dev_reset and pci_dev_reset Christoph Hellwig
2017-06-01 11:10   ` Christoph Hellwig
2017-06-15  3:11 ` avoid null pointer rereference during FLR V2 Bjorn Helgaas
2017-06-15  3:11   ` Bjorn Helgaas

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=1383840912.76088794.1496734116252.JavaMail.zimbra@kalray.eu \
    --to=mrybczyn@kalray.eu \
    /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.