[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJs94EbZFLc1iz8zoV5PO2grKMzE3R41-8zC_anQ4QchNjK_SA@mail.gmail.com>
Date: Fri, 20 Feb 2015 14:13:21 +0400
From: "Matwey V. Kornilov" <matwey@....msu.ru>
To: Stanimir Varbanov <svarbanov@...sol.com>
Cc: Mohit Kumar <mohit.kumar@...com>,
Viresh Kumar <viresh.kumar@...aro.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Greg KH <gregkh@...uxfoundation.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] pci: spear: Drop __initdata from spear13xx_pcie_driver
2015-02-20 13:06 GMT+03:00 Stanimir Varbanov <svarbanov@...sol.com>:
> On 02/19/2015 07:41 PM, Matwey V. Kornilov wrote:
>> spear13xx_pcie_driver.driver is allocated in text.init section
>> and then the pointer to it is passed futher. This patch is to avoid
>> crashes like the following, when freed memory is used.
>>
>> Also, __init has been dropped from the probe() function referred from the struct
>> and all called functions.
>>
>
> <snip>
>
>>
>> Signed-off-by: Matwey V. Kornilov <matwey@....msu.ru>
>> ---
>> Changes from v2:
>> - Drop __init from all probing functions to allow deferred probing.
>> Changes from v1:
>> - Use platform_driver_probe instead of platform_driver_register to make linker happy.
>>
>> drivers/pci/host/pcie-designware.c | 2 +-
>> drivers/pci/host/pcie-spear13xx.c | 6 +++---
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
>> index df781cd..5b8a056 100644
>> --- a/drivers/pci/host/pcie-designware.c
>> +++ b/drivers/pci/host/pcie-designware.c
>> @@ -339,7 +339,7 @@ static const struct irq_domain_ops msi_domain_ops = {
>> .map = dw_pcie_msi_map,
>> };
>>
>> -int __init dw_pcie_host_init(struct pcie_port *pp)
>> +int dw_pcie_host_init(struct pcie_port *pp)
>> {
>
> we need to fix up the other pci drivers which use dw_pcie_host_init(), too.
>
> pci-exynos, pci-imx6, pci-keystone and pci-layerscape.
>
> Could you prepare a patch with above drivers included?
What is wrong with them? To call ordinary function from __init section
is perfectly legal.
--
With best regards,
Matwey V. Kornilov.
Sternberg Astronomical Institute, Lomonosov Moscow State University, Russia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists