linux/drivers/isdn/gigaset
Linus Torvalds 55db4c64ed Revert "tty: make receive_buf() return the amout of bytes received"
This reverts commit b1c43f82c5.

It was broken in so many ways, and results in random odd pty issues.

It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
cause endless work-loops (see commit a5660b41af: "tty: fix endless
work loop when the buffer fills up").

It also used an "unsigned int" return value fo the ->receive_buf()
function, but then made multiple functions return a negative error code,
and didn't actually check for the error in the caller.

And it didn't actually work at all.  BenH bisected down odd tty behavior
to it:
  "It looks like the patch is causing some major malfunctions of the X
   server for me, possibly related to PTYs.  For example, cat'ing a
   large file in a gnome terminal hangs the kernel for -minutes- in a
   loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
   data in the quoted bits further down).

   ...

   Some more data: It -looks- like what happens is that the
   flush_to_ldisc work queue entry constantly re-queues itself (because
   the PTY is full ?) and the workqueue thread will basically loop
   forver calling it without ever scheduling, thus starving the consumer
   process that could have emptied the PTY."

which is pretty much exactly the problem we fixed in a5660b41af.

Milton Miller pointed out the 'unsigned int' issue.

Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reported-by: Milton Miller <miltonm@bga.com>
Cc: Stefan Bigler <stefan.bigler@keymile.com>
Cc: Toby Gray <toby.gray@realvnc.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-04 06:33:24 +09:00
..
asyncdata.c isdn/gigaset: honor CAPI application's buffer size request 2010-06-25 21:16:59 -07:00
bas-gigaset.c isdn: gigaset: Fix set-but-unused variable. 2011-04-17 16:22:33 -07:00
capi.c ISDN, Gigaset: Fix memory leak in do_disconnect_req() 2010-12-31 11:17:10 -08:00
common.c isdn/gigaset: drop obsolete debug option 2010-10-01 00:33:34 -07:00
dummyll.c
ev-layer.c kstrtox: convert drivers/isdn/ 2011-03-30 21:39:22 -07:00
gigaset.h isdn/gigaset: drop obsolete debug option 2010-10-01 00:33:34 -07:00
i4l.c isdn/gigaset: drop obsolete debug option 2010-10-01 00:33:34 -07:00
interface.c tty: now phase out the ioctl file pointer for good 2011-02-17 11:59:56 -08:00
isocdata.c isdn/gigaset: correct bas_gigaset rx buffer handling 2010-10-01 00:33:33 -07:00
Kconfig isdn/gigaset: remove EXPERIMENTAL tag from GIGASET_CAPI 2010-07-07 16:57:56 -07:00
Makefile
proc.c
ser-gigaset.c Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
usb-gigaset.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00