Re: [PATCH 2/2] USB: don't hold usb_bus_list_lock for usb_disconnect()

2013-09-14 Thread Alan Stern
On Sat, 14 Sep 2013, Bjorn Helgaas wrote: > This gets to the reason I'm interested -- we have PCI device removal > issues, and I have been thinking of them largely as reference counting > problems. I'd like to make the assertion that if you have a pci_bus > or a pci_dev pointer, e.g., acquired by

Re: [PATCH 2/2] USB: don't hold usb_bus_list_lock for usb_disconnect()

2013-09-14 Thread Bjorn Helgaas
On Fri, Sep 13, 2013 at 8:11 PM, Alan Stern wrote: > On Fri, 13 Sep 2013, Bjorn Helgaas wrote: > >> Thanks. Maybe this is more relevant than I thought. I'd sure like to >> copy your strategy rather than reinvent something. > > Well, I don't know if this will really end up being all that relevant

Re: [PATCH 2/2] USB: don't hold usb_bus_list_lock for usb_disconnect()

2013-09-13 Thread Alan Stern
On Fri, 13 Sep 2013, Bjorn Helgaas wrote: > Thanks. Maybe this is more relevant than I thought. I'd sure like to > copy your strategy rather than reinvent something. Well, I don't know if this will really end up being all that relevant for PCI, but you're welcome to steal any ideas you like. :

Re: [PATCH 2/2] USB: don't hold usb_bus_list_lock for usb_disconnect()

2013-09-13 Thread Bjorn Helgaas
On Fri, Sep 13, 2013 at 2:14 PM, Alan Stern wrote: > On Fri, 13 Sep 2013, Bjorn Helgaas wrote: > >> On Fri, Sep 13, 2013 at 12:25 PM, Alan Stern >> wrote: >> > On Fri, 13 Sep 2013, Bjorn Helgaas wrote: >> > >> >> usb_bus_list_lock protects the usb_bus_list, and we don't touch that list >> >> in

Re: [PATCH 2/2] USB: don't hold usb_bus_list_lock for usb_disconnect()

2013-09-13 Thread Alan Stern
On Fri, 13 Sep 2013, Bjorn Helgaas wrote: > On Fri, Sep 13, 2013 at 12:25 PM, Alan Stern > wrote: > > On Fri, 13 Sep 2013, Bjorn Helgaas wrote: > > > >> usb_bus_list_lock protects the usb_bus_list, and we don't touch that list > >> in usb_disconnect(), so there's no reason to hold the lock here.

Re: [PATCH 2/2] USB: don't hold usb_bus_list_lock for usb_disconnect()

2013-09-13 Thread Bjorn Helgaas
On Fri, Sep 13, 2013 at 12:25 PM, Alan Stern wrote: > On Fri, 13 Sep 2013, Bjorn Helgaas wrote: > >> usb_bus_list_lock protects the usb_bus_list, and we don't touch that list >> in usb_disconnect(), so there's no reason to hold the lock here. > > The code says: > > /* used when updating list of hc

[PATCH 2/2] USB: don't hold usb_bus_list_lock for usb_disconnect()

2013-09-13 Thread Bjorn Helgaas
usb_bus_list_lock protects the usb_bus_list, and we don't touch that list in usb_disconnect(), so there's no reason to hold the lock here. Signed-off-by: Bjorn Helgaas --- drivers/usb/core/hcd.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/h

Re: [PATCH 2/2] USB: don't hold usb_bus_list_lock for usb_disconnect()

2013-09-13 Thread Alan Stern
On Fri, 13 Sep 2013, Bjorn Helgaas wrote: > usb_bus_list_lock protects the usb_bus_list, and we don't touch that list > in usb_disconnect(), so there's no reason to hold the lock here. The code says: /* used when updating list of hcds */ DEFINE_MUTEX(usb_bus_list_lock);/* exported only f