Re: [PATCH] PCI: fix using __initdata memory after free in disable_acs_redir parameter

2019-01-17 Thread Bjorn Helgaas
On Tue, Jan 15, 2019 at 10:32:03AM -0700, Logan Gunthorpe wrote: > The disable_acs_redir parameter stores a pointer to the string passed to > pci_setup(). However, the string passed to PCI setup is actually a > temporary copy allocated in static __initdata memory. After init, once > the memory is f

Re: [PATCH] PCI: fix using __initdata memory after free in disable_acs_redir parameter

2019-01-16 Thread Logan Gunthorpe
On 2019-01-16 2:37 a.m., Jarkko Nikula wrote: > So this doesn't happen if you revert c5eb1190074c? Yes, but the bug was fully mine in the disable_acs_redir code. That patch only just made it noticable to me. > I guess this is due dev->state_saved being true set by > pci_pm_runtime_suspend() -

Re: [PATCH] PCI: fix using __initdata memory after free in disable_acs_redir parameter

2019-01-16 Thread Jarkko Nikula
Hi On 1/15/19 7:32 PM, Logan Gunthorpe wrote: The disable_acs_redir parameter stores a pointer to the string passed to pci_setup(). However, the string passed to PCI setup is actually a temporary copy allocated in static __initdata memory. After init, once the memory is freed, it is no longer va

[PATCH] PCI: fix using __initdata memory after free in disable_acs_redir parameter

2019-01-15 Thread Logan Gunthorpe
The disable_acs_redir parameter stores a pointer to the string passed to pci_setup(). However, the string passed to PCI setup is actually a temporary copy allocated in static __initdata memory. After init, once the memory is freed, it is no longer valid to reference this pointer. This bug was noti