Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-11 Thread Olivier Sobrie
On Fri, Jul 11, 2014 at 09:28:47AM +, David Laight wrote: > From: Olivier Sobrie Olivier Sobrie > > Hi Alan and Davids, > > > > On Thu, Jul 10, 2014 at 04:50:03PM +0100, One Thousand Gnomes wrote: > > > On Thu, 10 Jul 2014 14:37:37 + > > > David Laight wrote: > > > > > > > From: Olivier S

RE: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-11 Thread David Laight
From: Olivier Sobrie Olivier Sobrie > Hi Alan and Davids, > > On Thu, Jul 10, 2014 at 04:50:03PM +0100, One Thousand Gnomes wrote: > > On Thu, 10 Jul 2014 14:37:37 + > > David Laight wrote: > > > > > From: Olivier Sobrie > > > ... > > > > The function put_rxbuf_data() is called from the urb c

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-11 Thread Olivier Sobrie
Hi Alan and Davids, On Thu, Jul 10, 2014 at 04:50:03PM +0100, One Thousand Gnomes wrote: > On Thu, 10 Jul 2014 14:37:37 + > David Laight wrote: > > > From: Olivier Sobrie > > ... > > > The function put_rxbuf_data() is called from the urb completion handler. > > > It puts the data of the urb

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-10 Thread One Thousand Gnomes
> You really want to apply flow control back over the 'serial' link. > That may just cause data discards earlier on the local system. > But it is possible that not resubmitting the receive urb will cause the > modem to flow control back to the sender. > In which case there is some chance that data

RE: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-10 Thread David Laight
From: One Thousand Gnomes > On Thu, 10 Jul 2014 14:37:37 + > David Laight wrote: > > > From: Olivier Sobrie > > ... > > > The function put_rxbuf_data() is called from the urb completion handler. > > > It puts the data of the urb transfer in the tty buffer with > > > tty_insert_flip_string_fla

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-10 Thread One Thousand Gnomes
On Thu, 10 Jul 2014 14:37:37 + David Laight wrote: > From: Olivier Sobrie > ... > > The function put_rxbuf_data() is called from the urb completion handler. > > It puts the data of the urb transfer in the tty buffer with > > tty_insert_flip_string_flags() and schedules a work queue in order t

RE: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-10 Thread David Laight
From: Olivier Sobrie ... > The function put_rxbuf_data() is called from the urb completion handler. > It puts the data of the urb transfer in the tty buffer with > tty_insert_flip_string_flags() and schedules a work queue in order to > push the data to the ldisc. > Problem is that we are in a urb c

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-10 Thread Olivier Sobrie
Hi David, On Tue, Jul 08, 2014 at 04:16:33PM -0700, David Miller wrote: > From: Olivier Sobrie > Date: Mon, 7 Jul 2014 11:06:07 +0200 > > > When the module sends bursts of data, sometimes a deadlock happens in > > the hso driver when the tty buffer doesn't get the chance to be flushed > > quick

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-08 Thread David Miller
From: Olivier Sobrie Date: Mon, 7 Jul 2014 11:06:07 +0200 > When the module sends bursts of data, sometimes a deadlock happens in > the hso driver when the tty buffer doesn't get the chance to be flushed > quickly enough. > > To avoid this, first, we remove the endless while loop in > put_rx_bu

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-07 Thread Olivier Sobrie
Hi Dan, On Mon, Jul 07, 2014 at 11:41:20AM -0500, Dan Williams wrote: > On Mon, 2014-07-07 at 11:06 +0200, Olivier Sobrie wrote: > > When the module sends bursts of data, sometimes a deadlock happens in > > the hso driver when the tty buffer doesn't get the chance to be flushed > > quickly enough.

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-07 Thread Dan Williams
On Mon, 2014-07-07 at 11:06 +0200, Olivier Sobrie wrote: > When the module sends bursts of data, sometimes a deadlock happens in > the hso driver when the tty buffer doesn't get the chance to be flushed > quickly enough. > > To avoid this, first, we remove the endless while loop in > put_rx_bufdat

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-07 Thread Olivier Sobrie
On Mon, Jul 07, 2014 at 12:55:44PM +, David Laight wrote: > From: Olivier Sobrie > > Hi David, > > > > On Mon, Jul 07, 2014 at 09:13:53AM +, David Laight wrote: > > > From: Olivier Sobrie > > > > When the module sends bursts of data, sometimes a deadlock happens in > > > > the hso driver

RE: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-07 Thread David Laight
From: Olivier Sobrie > Hi David, > > On Mon, Jul 07, 2014 at 09:13:53AM +, David Laight wrote: > > From: Olivier Sobrie > > > When the module sends bursts of data, sometimes a deadlock happens in > > > the hso driver when the tty buffer doesn't get the chance to be flushed > > > quickly enoug

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-07 Thread Olivier Sobrie
Hi David, On Mon, Jul 07, 2014 at 09:13:53AM +, David Laight wrote: > From: Olivier Sobrie > > When the module sends bursts of data, sometimes a deadlock happens in > > the hso driver when the tty buffer doesn't get the chance to be flushed > > quickly enough. > > > > To avoid this, first, we

RE: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-07 Thread David Laight
From: Olivier Sobrie > When the module sends bursts of data, sometimes a deadlock happens in > the hso driver when the tty buffer doesn't get the chance to be flushed > quickly enough. > > To avoid this, first, we remove the endless while loop in > put_rx_bufdata() which is the root cause of the d

[PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-07 Thread Olivier Sobrie
When the module sends bursts of data, sometimes a deadlock happens in the hso driver when the tty buffer doesn't get the chance to be flushed quickly enough. To avoid this, first, we remove the endless while loop in put_rx_bufdata() which is the root cause of the deadlock. Secondly, when there is