Re: [PATCH V8 3/5] PCI/ASPM: add init hook to device_add

2017-04-13 Thread Bjorn Helgaas
On Thu, Apr 13, 2017 at 8:19 PM, Sinan Kaya wrote: > On 4/13/2017 5:02 PM, Bjorn Helgaas wrote: >> I do see that you change the deallocation in patch [5/5], but I think >> the deallocation change should be in the same patch as the allocation >> change. Otherwise I think we have a use-after-free p

Re: [PATCH V8 3/5] PCI/ASPM: add init hook to device_add

2017-04-13 Thread Sinan Kaya
On 4/13/2017 5:02 PM, Bjorn Helgaas wrote: > I do see that you change the deallocation in patch [5/5], but I think > the deallocation change should be in the same patch as the allocation > change. Otherwise I think we have a use-after-free problem in this > sequence: Sure, I'll reorder. As you ca

Re: [PATCH V8 3/5] PCI/ASPM: add init hook to device_add

2017-04-13 Thread Bjorn Helgaas
On Thu, Apr 13, 2017 at 03:48:00PM -0500, Bjorn Helgaas wrote: > Hi Sinan, > > On Sat, Apr 08, 2017 at 12:55:49AM -0400, Sinan Kaya wrote: > > For bridges, have pcie_aspm_init_link_state() allocate a link_state, > > regardless of whether it currently has any children. > > > > pcie_aspm_init_link_

Re: [PATCH V8 3/5] PCI/ASPM: add init hook to device_add

2017-04-13 Thread Bjorn Helgaas
Hi Sinan, On Sat, Apr 08, 2017 at 12:55:49AM -0400, Sinan Kaya wrote: > For bridges, have pcie_aspm_init_link_state() allocate a link_state, > regardless of whether it currently has any children. > > pcie_aspm_init_link_state(): Called for bridges (upstream end of > link) after all children have