alistair23-linux/drivers/misc
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
..
c2port Fix common misspellings 2011-03-31 11:26:23 -03:00
carma misc: Add CARMA DATA-FPGA Programmer support 2011-05-19 16:55:10 +10:00
cb710 misc: change to new flag variable 2011-03-17 14:05:34 +01:00
eeprom
ibmasm Merge branch 'master' into for-next 2011-04-26 10:22:59 +02:00
iwmc3200top Fix common misspellings 2011-03-31 11:26:23 -03:00
lis3lv02d Move lis3lv02d drivers to drivers/misc 2011-03-21 17:59:36 +01:00
sgi-gru sanitize <linux/prefetch.h> usage 2011-05-20 12:50:29 -07:00
sgi-xp
ti-st Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
ab8500-pwm.c
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c drivers/misc/apds9802als.c: put the device into runtime suspend after resume()/probe() is handled 2011-03-22 17:44:10 -07:00
arm-charlcd.c
atmel-ssc.c
atmel_pwm.c
atmel_tclib.c drivers/misc/atmel_tclib.c: fix a memory leak 2011-03-22 17:44:11 -07:00
bh1770glc.c
bh1780gli.c treewide: cleanup continuations and remove logging message whitespace 2011-04-26 10:24:37 +02:00
bmp085.c Fix common misspellings 2011-03-31 11:26:23 -03:00
cs5535-mfgpt.c cs5535: Fix section mismatch 2011-04-10 17:01:03 +02:00
ds1682.c
enclosure.c
ep93xx_pwm.c drivers/misc/ep93xx_pwm.c: world-writable sysfs files 2011-03-22 17:44:11 -07:00
hmc6352.c drivers/misc/hmc6352.c: fix wrong return value checking for i2c_master_recv() 2011-03-22 17:44:10 -07:00
hpilo.c
hpilo.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-05-23 12:23:20 -07:00
kgdbts.c kgdbts: only use new asm-generic/ptrace.h api when needed 2011-06-01 16:35:01 +09:00
lkdtm.c
Makefile Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-05-23 12:23:20 -07:00
pch_phub.c pch_phub: Support new device ML7223 2011-05-12 09:47:42 -07:00
phantom.c
pti.c Intel PTI implementaiton of MIPI 1149.7. 2011-05-13 16:31:00 -07:00
spear13xx_pcie_gadget.c treewide: cleanup continuations and remove logging message whitespace 2011-04-26 10:24:37 +02:00
ti_dac7512.c
tifm_7xx1.c
tifm_core.c
tsl2550.c
vmw_balloon.c