]> git.baikalelectronics.ru Git - kernel.git/commit
hso: fix deadlock when receiving bursts of data
authorOlivier Sobrie <olivier@sobrie.be>
Mon, 14 Jul 2014 10:08:50 +0000 (12:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jul 2014 02:27:34 +0000 (19:27 -0700)
commit3259f7a221a3d7d8183fd0ee5538b6c2599d1159
tree6dd457dfe72ca88b65ce041afe5124271f98f7ab
parent925ad2468f530c58bb3ec800f3ad015fbb8e2702
hso: fix deadlock when receiving bursts of data

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.

Remove the endless while loop in function put_rxbuf_data() which is
called by the urb completion handler.
If there isn't enough room in the tty buffer, discards all the data
received in the URB.

Cc: David Miller <davem@davemloft.net>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Jan Dumon <j.dumon@option.com>
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/hso.c