[PATCHv2] usb: f_rndis: Avoid to use ERROR macro if cdev can be null

2013-03-20 Thread oskar.andero
From: Truls Bengtsson The udc_irq service runs the isr_tr_complete_handler which in turn "nukes" the endpoints, including a call to rndis_response_complete, if appropriate. If the rndis_msg_parser fails here, an error will be printed using a dev_err call (through the ERROR() macro). However, if

[RFC PATCHv2 1/1] usb: f_rndis: Avoid to use ERROR macro if cdev can be null

2013-03-19 Thread oskar.andero
From: Truls Bengtsson The udc_irq service runs the isr_tr_complete_handler which in turn "nukes" the endpoints, including a call to rndis_response_complete, if appropriate. If the rndis_msg_parser fails here, an error will be printed using a dev_err call (through the ERROR() macro). However, if

[RFC PATCHv2 0/1] usb: f_rndis: Avoid to use ERROR macro if cdev can be null

2013-03-19 Thread oskar.andero
Hi, This is patch version 2. Besides review I hope to get some feed-back on what the preferred solution is. Background: When going through our patches to be mainlined I stumbled on this one which we have fixed in many different ways internally. The problem is a NULL pointer dereference that can

Re: [RFC PATCH 1/1] usb: f_rndis: Avoid to use ERROR macro if cdev can be null

2013-03-18 Thread oskar.andero
On 21:16 Fri 08 Mar , Greg Kroah-Hartman wrote: > On Fri, Mar 08, 2013 at 11:56:26PM +0400, Sergei Shtylyov wrote: > > Hello. > > > > On 08-03-2013 16:53, oskar.and...@sonymobile.com wrote: > > > > >From: Truls Bengtsson > > > > >The udc_irq service runs the isr_tr_complete_handler which in

[RFC PATCH 1/1] usb: f_rndis: Avoid to use ERROR macro if cdev can be null

2013-03-08 Thread oskar.andero
From: Truls Bengtsson The udc_irq service runs the isr_tr_complete_handler which in turn "nukes" the endpoints, including a call to rndis_response_complete, if appropriate. If the rndis_msg_parser fails here, an error will be printed using a dev_err call (through the ERROR() macro). However, if

[RFC PATCH 0/1] usb: f_rndis: Avoid to use ERROR macro if cdev can be null

2013-03-08 Thread oskar.andero
Hi, When going through our patches to be mainlined I stumbled on this one which we have fixed in many different ways internally. The problem is a NULL pointer dereference that can be triggered by disconnecting the USB cable at a specific time. Before submitting the final patch I would like to he