Re: [PATCH 2/2] USB: hub: change the locking in hub_activate

2016-09-02 Thread Alan Stern
On Thu, 1 Sep 2016, Vaibhav Hiremath wrote: > >> I can put prints to trace the execution flow, lets see what comes out > >> from it. > > How easily can you reproduce the problem? > > Very easily. I would say 7-8 times out of 10. Then you can add a printk in hub_activate() just before the call to

Re: [PATCH 2/2] USB: hub: change the locking in hub_activate

2016-09-01 Thread Vaibhav Hiremath
On Thursday 01 September 2016 07:59 PM, Alan Stern wrote: On Thu, 1 Sep 2016, Viresh Kumar wrote: On 31-08-16, 12:46, Alan Stern wrote: On Wed, 31 Aug 2016, Viresh Kumar wrote: On 05-08-16, 11:51, Alan Stern wrote: +++ usb-4.x/drivers/usb/core/hub.c @@ -1052,7 +1052,7 @@ static void hub_a

Re: [PATCH 2/2] USB: hub: change the locking in hub_activate

2016-09-01 Thread Alan Stern
On Thu, 1 Sep 2016, Viresh Kumar wrote: > On 31-08-16, 12:46, Alan Stern wrote: > > On Wed, 31 Aug 2016, Viresh Kumar wrote: > > > > > On 05-08-16, 11:51, Alan Stern wrote: > > > > +++ usb-4.x/drivers/usb/core/hub.c > > > > @@ -1052,7 +1052,7 @@ static void hub_activate(struct usb_hub > > > > >

Re: [PATCH 2/2] USB: hub: change the locking in hub_activate

2016-09-01 Thread Vaibhav Hiremath
On Thursday 01 September 2016 10:32 AM, Viresh Kumar wrote: On 31-08-16, 12:46, Alan Stern wrote: On Wed, 31 Aug 2016, Viresh Kumar wrote: On 05-08-16, 11:51, Alan Stern wrote: +++ usb-4.x/drivers/usb/core/hub.c @@ -1052,7 +1052,7 @@ static void hub_activate(struct usb_hub /* Continue

Re: [PATCH 2/2] USB: hub: change the locking in hub_activate

2016-08-31 Thread Viresh Kumar
On 31-08-16, 12:46, Alan Stern wrote: > On Wed, 31 Aug 2016, Viresh Kumar wrote: > > > On 05-08-16, 11:51, Alan Stern wrote: > > > +++ usb-4.x/drivers/usb/core/hub.c > > > @@ -1052,7 +1052,7 @@ static void hub_activate(struct usb_hub > > > > > > /* Continue a partial initialization */ > > >

Re: [PATCH 2/2] USB: hub: change the locking in hub_activate

2016-08-31 Thread Alan Stern
On Wed, 31 Aug 2016, Viresh Kumar wrote: > On 05-08-16, 11:51, Alan Stern wrote: > > +++ usb-4.x/drivers/usb/core/hub.c > > @@ -1052,7 +1052,7 @@ static void hub_activate(struct usb_hub > > > > /* Continue a partial initialization */ > > if (type == HUB_INIT2 || type == HUB_INIT3) { > >

Re: [PATCH 2/2] USB: hub: change the locking in hub_activate

2016-08-05 Thread Viresh Kumar
On 05-08-16, 11:51, Alan Stern wrote: > The locking in hub_activate() is not adequate to provide full mutual > exclusion with hub_quiesce(). The subroutine locks the hub's > usb_interface, but the callers of hub_quiesce() (such as > hub_pre_reset() and hub_event()) hold the lock to the hub's > usb

[PATCH 2/2] USB: hub: change the locking in hub_activate

2016-08-05 Thread Alan Stern
The locking in hub_activate() is not adequate to provide full mutual exclusion with hub_quiesce(). The subroutine locks the hub's usb_interface, but the callers of hub_quiesce() (such as hub_pre_reset() and hub_event()) hold the lock to the hub's usb_device. This patch changes hub_activate() to m