From: Rakesh Pandit <rakesh@tuxera.com>
To: <linux-pci@vger.kernel.org>
Cc: <helgaas@kernel.org>, <linux-nvme@lists.infradead.org>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] PCI: ensure the PCI device is locked over ->reset_notify calls
Date: Mon, 29 May 2017 12:19:09 +0300 [thread overview]
Message-ID: <20170529091909.GA33654@dhcp-216.srv.tuxera.com> (raw)
In-Reply-To: <20170523054202.7985-2-hch@lst.de>
Hi,
On Tue, May 23, 2017 at 07:42:02AM +0200, Christoph Hellwig wrote:
> Without this ->notify_reset instance may race with ->remove calls,
> which can be easily triggered in NVMe.
>
Any input on this sometime before next -rc release would be great ?
> Reported-by: Rakesh Pandit <rakesh@tuxera.com>
> Tested-by: Rakesh Pandit <rakesh@tuxera.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/pci/pci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index b01bd5bba8e6..b61ad77dc322 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4275,11 +4275,13 @@ int pci_reset_function(struct pci_dev *dev)
> if (rc)
> return rc;
>
> + pci_dev_lock(dev);
> pci_dev_save_and_disable(dev);
>
> - rc = pci_dev_reset(dev, 0);
> + rc = __pci_dev_reset(dev, 0);
>
> pci_dev_restore(dev);
> + pci_dev_unlock(dev);
>
> return rc;
> }
> --
> 2.11.0
>
next prev parent reply other threads:[~2017-05-29 9:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 5:42 avoid null pointer rereference during FLR Christoph Hellwig
2017-05-23 5:42 ` [PATCH] PCI: ensure the PCI device is locked over ->reset_notify calls Christoph Hellwig
2017-05-29 9:19 ` Rakesh Pandit [this message]
2017-05-30 22:28 ` Bjorn Helgaas
2017-05-31 4:58 ` Christoph Hellwig
2017-05-31 16:51 ` Bjorn Helgaas
2017-06-01 10:46 ` Christoph Hellwig
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=20170529091909.GA33654@dhcp-216.srv.tuxera.com \
--to=rakesh@tuxera.com \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
/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).