Re: [PATCH] PCI: hv: Fix panic by calling hv_pci_remove_slots() earlier

2019-08-02 Thread Bjorn Helgaas
On Fri, Aug 02, 2019 at 08:31:26PM +, Dexuan Cui wrote: > > From: Bjorn Helgaas > > Sent: Friday, August 2, 2019 12:41 PM > > The subject line only describes the mechanical code change, which is > > obvious from the patch. It would be better if we could say something > > about *why* we need

RE: [PATCH] PCI: hv: Fix panic by calling hv_pci_remove_slots() earlier

2019-08-02 Thread Dexuan Cui
> From: Bjorn Helgaas > Sent: Friday, August 2, 2019 12:41 PM > The subject line only describes the mechanical code change, which is > obvious from the patch. It would be better if we could say something > about *why* we need this. Hi Bjorn, Sorry. I'll try to write a better changelog in v2.

Re: [PATCH] PCI: hv: Fix panic by calling hv_pci_remove_slots() earlier

2019-08-02 Thread Bjorn Helgaas
Hi Dexuan, The subject line only describes the mechanical code change, which is obvious from the patch. It would be better if we could say something about *why* we need this. On Fri, Aug 02, 2019 at 01:32:28AM +, Dexuan Cui wrote: > > When a slot is removed, the pci_dev must still exist. >

[PATCH] PCI: hv: Fix panic by calling hv_pci_remove_slots() earlier

2019-08-01 Thread Dexuan Cui
When a slot is removed, the pci_dev must still exist. pci_remove_root_bus() removes and free all the pci_devs, so hv_pci_remove_slots() must be called before pci_remove_root_bus(), otherwise a general protection fault can happen, if the kernel is built with the memory debugging options. Fixes: