lkml.org 
[lkml]   [2008]   [Aug]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: refcount leak in pci_get_device()?
DateSat, 30 Aug 2008 14:20:52 +0800
From"Zhao, Yu" <>
It's been so for a while, guess since 2.5. I meant to say the pci_remove_bus_device(), not pci_remove_bus(), is used by pci hotplug code. If a device is being plugged off, and some drivers are calling pci_get_dev_by_id() to search something, then the warning might be fired through bus_find_device -> klist_iter_init_node ->kref_get.

Thanks,
Yu

>-----Original Message----->From: linux-pci-owner@vger.kernel.org>[mailto:linux-pci-owner@vger.kernel.org] On Behalf Of Greg KH
>Sent: Saturday, August 30, 2008 1:38 PM>To: Zhao, Yu>Cc: Alex Chiang; Matthew Wilcox; linux-pci@vger.kernel.org;
>linux-kernel@vger.kernel.org>Subject: Re: refcount leak in pci_get_device()?>>On Sat, Aug 30, 2008 at 12:23:20PM +0800, Zhao, Yu wrote:
>> And the pci_get_dev_by_id() is not safe again the PCI device removal.
>> It might fire a warning in bus_find_device() when reference count of
>> the knode_bus is decreased to 0 by pci_remove_bus().>>Is this something new?  Hasn't this always been that way?  Why would you
>be wanting to call this function anyway?>>thanks,>>greg k-h>-->To unsubscribe from this list: send the line "unsubscribe linux-pci" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html


\
 
 \ /
  Last update: 2008-08-30 08:23    [from the cache]
©2003-2008