Re: [PATCH v2 for-4.9 03/32] PCI: iproc: Save host bridge window resource in struct iproc_pcie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 05, 2017 at 04:01:55PM +0530, Amit Pundir wrote:
> From: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> 
> 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 <zajec5@xxxxxxxxx>
> Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> (cherry picked from commit 6e347b5e05ea2ac4ac467a5a1cfaebb2c7f06f80)
> Signed-off-by: Amit Pundir <amit.pundir@xxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]