Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754112AbbBTKGn (ORCPT ); Fri, 20 Feb 2015 05:06:43 -0500 Received: from ns.mm-sol.com ([37.157.136.199]:40502 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753862AbbBTKGl (ORCPT ); Fri, 20 Feb 2015 05:06:41 -0500 Message-ID: <54E7072C.30303@mm-sol.com> Date: Fri, 20 Feb 2015 12:06:36 +0200 From: Stanimir Varbanov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 MIME-Version: 1.0 To: "Matwey V. Kornilov" CC: mohit.kumar@st.com, viresh.kumar@linaro.org, linux-pci@vger.kernel.org, gregkh@linuxfoundation.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] pci: spear: Drop __initdata from spear13xx_pcie_driver References: <1424367708-17149-1-git-send-email-matwey@sai.msu.ru> In-Reply-To: <1424367708-17149-1-git-send-email-matwey@sai.msu.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1669 Lines: 51 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. > > > Signed-off-by: Matwey V. Kornilov > --- > 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? -- regards, Stan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/