* [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment
@ 2017-02-28 8:08 Vivek Gautam
2017-02-28 21:02 ` Bjorn Helgaas
0 siblings, 1 reply; 3+ messages in thread
From: Vivek Gautam @ 2017-02-28 8:08 UTC (permalink / raw)
To: bhelgaas
Cc: Vivek Gautam, Guenter Roeck, Kishon Vijay Abraham I, Jingoo Han,
Joao Pinto, linux-pci, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment
2017-02-28 8:08 [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment Vivek Gautam
@ 2017-02-28 21:02 ` Bjorn Helgaas
2017-03-02 4:02 ` Vivek Gautam
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2017-02-28 21:02 UTC (permalink / raw)
To: Vivek Gautam
Cc: bhelgaas, Guenter Roeck, Kishon Vijay Abraham I, Jingoo Han,
Joao Pinto, linux-pci, linux-kernel
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment
2017-02-28 21:02 ` Bjorn Helgaas
@ 2017-03-02 4:02 ` Vivek Gautam
0 siblings, 0 replies; 3+ messages in thread
From: Vivek Gautam @ 2017-03-02 4:02 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: bhelgaas, Guenter Roeck, Kishon Vijay Abraham I, Jingoo Han,
Joao Pinto, linux-pci, linux-kernel
On 03/01/2017 02:32 AM, Bjorn Helgaas wrote:
> 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.
Thanks Bjorn.
BRs
Vivek
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-02 4:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 8:08 [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment Vivek Gautam
2017-02-28 21:02 ` Bjorn Helgaas
2017-03-02 4:02 ` Vivek Gautam
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.