kernel-fxtec-pro1x/drivers/isdn
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
..
act2000 isdn: Free irq_data namespace 2010-10-04 11:00:55 +02:00
capi isdn: capi: Use pr_debug() instead of ifdefs. 2011-05-19 18:20:29 -04:00
divert isdn: potential buffer overflows 2010-09-06 18:29:18 -07:00
gigaset Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
hardware Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-05-26 13:19:00 -07:00
hisax Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2011-05-24 13:28:35 -07:00
hysdn Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-04-11 13:44:25 -07:00
i4l isdn: i4l: isdn_tty: Fix unused-but-set variables. 2011-04-17 17:07:57 -07:00
icn isdn: icn: Fix potentially wrong string handling 2011-02-01 14:17:51 -08:00
isdnloop Fix common misspellings 2011-03-31 11:26:23 -03:00
mISDN isdn: mISDN: socket: Fix set-but-unused variables. 2011-04-17 16:48:53 -07:00
pcbit drivers/isdn: Use static const char * const where possible 2010-09-14 20:22:02 -07:00
sc isdn: strcpy() => strlcpy() 2010-10-08 10:21:22 -07:00
Kconfig isdn: fix a few Kconfig imperfections 2010-02-22 15:45:53 -08:00
Makefile