From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:45722 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756509AbdDFHdr (ORCPT ); Thu, 6 Apr 2017 03:33:47 -0400 Date: Thu, 6 Apr 2017 09:33:34 +0200 From: Greg KH To: Amit Pundir Cc: stable@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH v2 for-4.9 03/32] PCI: iproc: Save host bridge window resource in struct iproc_pcie Message-ID: <20170406073334.GF14752@kroah.com> References: <1491388344-13521-1-git-send-email-amit.pundir@linaro.org> <1491388344-13521-4-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1491388344-13521-4-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org List-ID: On Wed, Apr 05, 2017 at 04:01:55PM +0530, Amit Pundir wrote: > From: Bjorn Helgaas > > The host bridge memory window resource is inserted into the iomem_resource > tree and cannot be deallocated until the host bridge itself is removed. > > Previously, the window was on the stack, which meant the iomem_resource > entry pointed into the stack and was corrupted as soon as the probe > function returned, which caused memory corruption and errors like this: > > pcie_iproc_bcma bcma0:8: resource collision: [mem 0x40000000-0x47ffffff] conflicts with PCIe MEM space [mem 0x40000000-0x47ffffff] > > Move the memory window resource from the stack into struct iproc_pcie so > its lifetime matches that of the host bridge. > > Fixes: c3245a566400 ("PCI: iproc: Request host bridge window resources") > Reported-and-tested-by: Rafał Miłecki > Signed-off-by: Bjorn Helgaas > (cherry picked from commit 6e347b5e05ea2ac4ac467a5a1cfaebb2c7f06f80) > Signed-off-by: Amit Pundir > --- > drivers/pci/host/pcie-iproc-bcma.c | 24 ++++++++++++------------ > drivers/pci/host/pcie-iproc-platform.c | 19 ++++++++++--------- > drivers/pci/host/pcie-iproc.h | 1 + > 3 files changed, 23 insertions(+), 21 deletions(-) This is already in my stable queue, why include it again? thanks, greg k-h