- Subject: Re: [PATCH -v3 40/47] PCI: Add pci bus removal through /sys/.../pci_bus/.../remove
- From: Jiang Liu <liuj97@xxxxxxxxx>
- Date: Sat, 07 Apr 2012 00:22:34 +0800
- Cc: Yinghai Lu <yhlu.kernel@xxxxxxxxx>, Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>, x86 <x86@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Randy Dunlap <rdunlap@xxxxxxxxxxxx>, linux-doc@xxxxxxxxxxxxxxx
- In-reply-to: <CAErSpo6gitMTVXeMBOSJFRHvQT_iJ-RGmLduYsGEM+3YAPE2CQ@mail.gmail.com>
- References: <1332135996-13860-1-git-send-email-yinghai@kernel.org> <1332135996-13860-41-git-send-email-yinghai@kernel.org> <4F7F10C5.1050901@gmail.com> <CAE9FiQUEJ4Jvz0BHJ8LCBNpXWB3Cf6u3k9F1avAd4a-fkGOB=Q@mail.gmail.com> <CAErSpo6gitMTVXeMBOSJFRHvQT_iJ-RGmLduYsGEM+3YAPE2CQ@mail.gmail.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1
On 04/07/2012 12:07 AM, Bjorn Helgaas wrote:
> On Fri, Apr 6, 2012 at 10:01 AM, Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:
>> On Fri, Apr 6, 2012 at 8:50 AM, Jiang Liu <liuj97@xxxxxxxxx> wrote:
>>> Hi Yinghai,
>>> I found many other drivers assume that a pci bus won't disappear if
>>> the corresponding PCI bridge device still exists. The sysfs interface proposed
>>> here breaks that assumption and may cause many access-after-free issues.
>>> So what's the purpose of this interface? Should we remove this interface or
>>> enhance other drivers to avoid invalid memory access issues?
>
> Can you point out some of the specifics about drivers making this
> assumption? I'm not thrilled about the idea of removing a pci_bus
> while the upstream bridge pci_dev still exists either.
According to my understanding, following drivers may have such an assumption:
acpiphp, pciehp, shpcphp, acpi/pci_slot, acpi/pci_bind.
I suspect there are still other drivers have such issues.
>
>> ok, will make it only show up on root bus.
>
> OK. I'm still interested in the specifics because I don't like the
> way the pci_bus is exposed, even inside the kernel. The bus itself is
> not an active entity, and we can't really do anything with it except
> by touching a device connected to it.
>
> Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]