Re: [PATCH] usb: gadget: Check for NULL pointer in disconnect

2015-03-24 Thread Felipe Balbi
On Mon, Mar 23, 2015 at 04:00:37PM -0700, Badhri Jagan Sridharan wrote: > > Do you really see some udc drivers call it after composite_unbind is > > called? If it is, you may add dump_stack() to track that error. > > > > Besides this, function suspended_show is needed to add cdev NULL pointer > > c

Re: [PATCH] usb: gadget: Check for NULL pointer in disconnect

2015-03-24 Thread Peter Chen
On Mon, Mar 23, 2015 at 04:00:37PM -0700, Badhri Jagan Sridharan wrote: > > Do you really see some udc drivers call it after composite_unbind is > > called? If it is, you may add dump_stack() to track that error. > > > > Besides this, function suspended_show is needed to add cdev NULL pointer > > c

Re: [PATCH] usb: gadget: Check for NULL pointer in disconnect

2015-03-23 Thread Badhri Jagan Sridharan
> Do you really see some udc drivers call it after composite_unbind is > called? If it is, you may add dump_stack() to track that error. > > Besides this, function suspended_show is needed to add cdev NULL pointer > checking. We see this happening occasionally in *not yet* upstreamed UDC code of

Re: [PATCH] usb: gadget: Check for NULL pointer in disconnect

2015-03-22 Thread Peter Chen
On Fri, Mar 20, 2015 at 04:40:52PM -0700, Badhri Jagan Sridharan wrote: > Added a safety net to make sure that > composite_disconnect does not end up disconneting > a NULL device. Prevents NULL pointer crash. > > Signed-off-by: Badhri Jagan Sridharan > --- > drivers/usb/gadget/composite.c | 5 ++

[PATCH] usb: gadget: Check for NULL pointer in disconnect

2015-03-20 Thread Badhri Jagan Sridharan
Added a safety net to make sure that composite_disconnect does not end up disconneting a NULL device. Prevents NULL pointer crash. Signed-off-by: Badhri Jagan Sridharan --- drivers/usb/gadget/composite.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/gadget/composite.c b/dr