Re: [PATCH] usb: gadget/composite : Avoid crash with bad gadget drivers

2013-08-27 Thread Felipe Balbi
On Thu, Aug 15, 2013 at 01:40:01AM +0300, Philippe De Swert wrote: > Hi, > > On 12/08/13 21:08, Felipe Balbi wrote: > >On Fri, Aug 09, 2013 at 09:23:08PM +0300, Philippe De Swert wrote: > >>Some bad gadget drivers do not check the return status of usb_add_config. > > > >fix the gadget driver > >

Re: [PATCH] usb: gadget/composite : Avoid crash with bad gadget drivers

2013-08-14 Thread Philippe De Swert
Hi, On 12/08/13 21:08, Felipe Balbi wrote: On Fri, Aug 09, 2013 at 09:23:08PM +0300, Philippe De Swert wrote: Some bad gadget drivers do not check the return status of usb_add_config. fix the gadget driver As stated in my comment (see below) that is indeed what should happen. But we cannot

Re: [PATCH] usb: gadget/composite : Avoid crash with bad gadget drivers

2013-08-12 Thread Felipe Balbi
On Fri, Aug 09, 2013 at 09:23:08PM +0300, Philippe De Swert wrote: > Some bad gadget drivers do not check the return status of usb_add_config. fix the gadget driver > Thus they get a not correctly initialized config and when this gadget gets > deactivated the whole kernel crashes. Since on initia

[PATCH] usb: gadget/composite : Avoid crash with bad gadget drivers

2013-08-09 Thread Philippe De Swert
Some bad gadget drivers do not check the return status of usb_add_config. Thus they get a not correctly initialized config and when this gadget gets deactivated the whole kernel crashes. Since on initialization failure cdev is set to NULL it can be used to detect this problem situation. It can be a