Re: [PATCH] usb: hub: Fix unbalanced reference count and memory leak

2016-07-28 Thread Viresh Kumar
On 28-07-16, 10:13, Alan Stern wrote: > On Wed, 27 Jul 2016, Viresh Kumar wrote: > > > If the hub gets disconnected while the core is still activating it, this > > can result in leaking memory of few USB structures. > > > > This will happen if we have done a kref_get() from hub_activate() and > >

Re: [PATCH] usb: hub: Fix unbalanced reference count and memory leak

2016-07-28 Thread Alan Stern
On Wed, 27 Jul 2016, Viresh Kumar wrote: > If the hub gets disconnected while the core is still activating it, this > can result in leaking memory of few USB structures. > > This will happen if we have done a kref_get() from hub_activate() and > scheduled a delayed work item for HUB_INIT2/3. Now

[PATCH] usb: hub: Fix unbalanced reference count and memory leak

2016-07-27 Thread Viresh Kumar
If the hub gets disconnected while the core is still activating it, this can result in leaking memory of few USB structures. This will happen if we have done a kref_get() from hub_activate() and scheduled a delayed work item for HUB_INIT2/3. Now if hub_disconnect() gets called before the delayed w