[PATCH] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Johan Hovold
Make sure serial-driver dtr_rts is called with disc_mutex held after checking the disconnected flag. Due to a bug in the tty layer, dtr_rts may get called after a device has been disconnected and the tty-device unregistered. Some drivers have had individual checks for disconnect to make sure the d

Re: [PATCH] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Felipe Balbi
On Wed, Feb 13, 2013 at 03:28:51PM +0100, Johan Hovold wrote: > Make sure serial-driver dtr_rts is called with disc_mutex held after > checking the disconnected flag. > > Due to a bug in the tty layer, dtr_rts may get called after a device has why don't you fix the bug in the tty layer instead ?

Re: [PATCH] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Johan Hovold
On Wed, Feb 13, 2013 at 04:34:36PM +0200, Felipe Balbi wrote: > On Wed, Feb 13, 2013 at 03:28:51PM +0100, Johan Hovold wrote: > > Make sure serial-driver dtr_rts is called with disc_mutex held after > > checking the disconnected flag. > > > > Due to a bug in the tty layer, dtr_rts may get called a

Re: [PATCH] USB: serial: fix null-pointer dereferences on disconnect

2013-02-13 Thread Greg KH
On Wed, Feb 13, 2013 at 03:28:51PM +0100, Johan Hovold wrote: > Make sure serial-driver dtr_rts is called with disc_mutex held after > checking the disconnected flag. > > Due to a bug in the tty layer, dtr_rts may get called after a device has > been disconnected and the tty-device unregistered. S