Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589259 > unrolled thread
| Started by | Vivek Gautam <vivek.gautam@codeaurora.org> |
|---|---|
| First post | 2017-02-28 09:10 +0100 |
| Last post | 2017-02-28 22:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-02-28 09:10 +0100
Re: [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment Bjorn Helgaas <helgaas@kernel.org> - 2017-02-28 22:30 +0100
| From | Vivek Gautam <vivek.gautam@codeaurora.org> |
|---|---|
| Date | 2017-02-28 09:10 +0100 |
| Subject | [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment |
| Message-ID | <tfL18-1He-9@gated-at.bofh.it> |
Add missing assignment of dw_pci core structure for
designware-plat.
Commit 8b130f815a6b ("PCI: dwc: Fix crashes seen due to missing
assignments") fixed all other platforms, but missed
designware-plat file.
Fixes: 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures")
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Joao Pinto <Joao.Pinto@synopsys.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
---
Based on torvald's master branch.
Build tested.
drivers/pci/dwc/pcie-designware-plat.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/dwc/pcie-designware-plat.c b/drivers/pci/dwc/pcie-designware-plat.c
index 65250f63515c..b6c832ba39dd 100644
--- a/drivers/pci/dwc/pcie-designware-plat.c
+++ b/drivers/pci/dwc/pcie-designware-plat.c
@@ -104,6 +104,8 @@ static int dw_plat_pcie_probe(struct platform_device *pdev)
pci->dev = dev;
+ dw_plat_pcie->pci = pci;
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
pci->dbi_base = devm_ioremap_resource(dev, res);
if (IS_ERR(pci->dbi_base))
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
[toc] | [next] | [standalone]
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Date | 2017-02-28 22:30 +0100 |
| Subject | Re: [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment |
| Message-ID | <tfXvj-1v9-7@gated-at.bofh.it> |
| In reply to | #1589259 |
On Tue, Feb 28, 2017 at 01:38:18PM +0530, Vivek Gautam wrote:
> Add missing assignment of dw_pci core structure for
> designware-plat.
>
> Commit 8b130f815a6b ("PCI: dwc: Fix crashes seen due to missing
> assignments") fixed all other platforms, but missed
> designware-plat file.
>
> Fixes: 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures")
>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Jingoo Han <jingoohan1@gmail.com>
> Cc: Joao Pinto <Joao.Pinto@synopsys.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Thanks, Vivek! I folded this into Guenter's patch and added your
Signed-off-by for this designware-plat fix. I'll ask Linus to pull this
before v4.11-rc1.
> ---
>
> Based on torvald's master branch.
> Build tested.
>
> drivers/pci/dwc/pcie-designware-plat.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pci/dwc/pcie-designware-plat.c b/drivers/pci/dwc/pcie-designware-plat.c
> index 65250f63515c..b6c832ba39dd 100644
> --- a/drivers/pci/dwc/pcie-designware-plat.c
> +++ b/drivers/pci/dwc/pcie-designware-plat.c
> @@ -104,6 +104,8 @@ static int dw_plat_pcie_probe(struct platform_device *pdev)
>
> pci->dev = dev;
>
> + dw_plat_pcie->pci = pci;
> +
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> pci->dbi_base = devm_ioremap_resource(dev, res);
> if (IS_ERR(pci->dbi_base))
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web