Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647091
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Christoph Hellwig <hch@lst.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD |
| Date | Mon, 22 May 2017 18:10:02 +0200 |
| Message-ID | <tJY4a-7To-9@gated-at.bofh.it> (permalink) |
| References | <tJgZb-4S9-9@gated-at.bofh.it> <tJsnD-47k-1@gated-at.bofh.it> <tJXKO-7v6-17@gated-at.bofh.it> <tJY4a-7To-11@gated-at.bofh.it> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.17 (2007-11-01) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 34 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Christoph Hellwig <hch@lst.de>, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Keith Busch <keith.busch@intel.com>, Jens Axboe <axboe@fb.com>, Sagi Grimberg <sagi@grimberg.me>, linux-pci@vger.kernel.org |
| X-Original-Date | Mon, 22 May 2017 18:04:20 +0200 |
| X-Original-Message-ID | <20170522160420.GA26356@lst.de> |
| X-Original-References | <20170520175952.GA11258@dhcp-216.srv.tuxera.com> <20170521061736.GA12287@lst.de> <20170522153829.GA17980@dhcp-216.srv.tuxera.com> <20170522160217.GA26104@lst.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1647091 |
Show key headers only | View raw
On Mon, May 22, 2017 at 06:02:17PM +0200, Christoph Hellwig wrote: > On Mon, May 22, 2017 at 06:38:29PM +0300, Rakesh Pandit wrote: > > Just got to use the using the test box again and you are right that > > nvme_remove_dead_ctrl_work is getting called just before the NULL > > pointer dereference. > > > > Here call trace to nvme_timeout which results in eventually call to > > nvme_reset when it wants to reset the controller (which races with > > ->reset_notify from PCI layer): > > Does the patch below fix the issue for you? Actually, it probably should be this one, but for you the effects are probably the same: 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; }
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD Rakesh Pandit <rakesh@tuxera.com> - 2017-05-20 20:10 +0200
Re: [PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD Christoph Hellwig <hch@lst.de> - 2017-05-21 08:20 +0200
Re: [PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD Rakesh Pandit <rakesh@tuxera.com> - 2017-05-22 17:50 +0200
Re: [PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD Christoph Hellwig <hch@lst.de> - 2017-05-22 18:10 +0200
Re: [PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD Rakesh Pandit <rakesh@tuxera.com> - 2017-05-22 22:20 +0200
Re: [PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD Christoph Hellwig <hch@lst.de> - 2017-05-22 18:10 +0200
csiph-web