[PATCH] powerpc: fix oops in pcibios_release_device() after pcibios_free_controller()

Mauricio Faria de Oliveira mauricfo at linux.vnet.ibm.com
Wed Jul 13 09:07:25 AEST 2016


Ben,

On 07/04/2016 11:55 PM, Benjamin Herrenschmidt wrote:
> Have you considered instead adding a kref to the PHB and only freeing
> it when all devices have been freed ? Or it's too hard to tract device
> creation ?

Can you clarify which are the devices that should be tracked w/ krefs to
the PHB?

I've been wondering if it's just the root bus (phb->bus) -- which relays
on it (ie its phb->bus->children and phb->bus->devices) being eventually
freed in order to free the phb, or perhaps track the children & devices
directly.

If that's too far from sensible, can you point some interesting places
to look at? I've read much of arch/powerpc/kernel/pci-{common,hotplug}.c
and arch/powerpc/include/asm/pci-bridge.h, and some more in drivers/pci,
but things weren't as obvious to a newcomer in this area.

Thanks,

-- 
Mauricio Faria de Oliveira
IBM Linux Technology Center



More information about the Linuxppc-dev mailing list