linux/drivers/char
Linus Torvalds 202c4675c5 pty_write: don't do a tty_wakeup() when the buffers are full
Commit ac89a9174 ("pty: don't limit the writes to 'pty_space()' inside
'pty_write()'") removed the pty_space() checking, in order to let the
regular tty buffer code limit the buffering itself.

That was all good, but as a subtle side effect it meant that we'd be
doing a tty_wakeup() even in the case where the buffers were all filled
up, and didn't actually make any progress on the write.

Which sounds innocuous, but it interacts very badly with the ppp_async
code, which has an infinite loop in ppp_async_push() that tries to push
out data to the tty.  When we call tty_wakeup(), that loop ends up
thinking that progress was made (see the subtle interactions between
XMIT_WAKEUP and 'tty_stuffed' for details).  End result: one unhappy ppp
user.

Fixed by noticing when tty_insert_flip_string() didn't actually do
anything, and then not doing any more processing (including, very much
not calling tty_wakeup()).

Bisected-and-tested-by: Peter Volkov <pva@gentoo.org>
Cc: stable@kernel.org (2.6.31)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-18 07:05:58 -07:00
..
agp Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
hw_random MIPS: hw_random: Add hardware RNG for Octeon SOCs. 2009-09-17 20:07:51 +02:00
ip2
ipmi
mwave
pcmcia hdlc: convert to netdev_tx_t 2009-09-01 01:13:31 -07:00
rio
tpm TPM: Fixup boot probe timeout for tpm_tis driver 2009-09-10 19:19:09 +10:00
xilinx_hwicap
.gitignore
amiserial.c
apm-emulation.c
applicom.c
applicom.h
bfin-otp.c
bfin_jtag_comm.c
briq_panel.c
bsr.c
cd1865.h
ChangeLog
consolemap.c
cp437.uni
cs5535_gpio.c
cyclades.c
defkeymap.c_shipped
defkeymap.map
digi1.h
digiFep1.h
digiPCI.h
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
epca.c
epca.h
epcaconfig.h
esp.c
generic_nvram.c powerpc/nvram: Enable use Generic NVRAM driver for different size chips 2009-09-11 16:02:11 +10:00
generic_serial.c
genrtc.c
hangcheck-timer.c
hpet.c
hvc_beat.c
hvc_console.c hvc_console: Drop unnecessary NULL test 2009-08-20 10:29:23 +10:00
hvc_console.h
hvc_irq.c
hvc_iseries.c
hvc_iucv.c [S390] proper use of device register 2009-09-11 10:29:45 +02:00
hvc_rtas.c
hvc_udbg.c
hvc_vio.c hvc_console: Add __init and __exit to hvc_vio 2009-08-28 14:24:11 +10:00
hvc_xen.c
hvcs.c
hvsi.c powerpc/hvsi: Avoid calculating possibly-invalid address 2009-08-20 10:29:28 +10:00
i8k.c
isicom.c
istallion.c
Kconfig
keyboard.c
lp.c
Makefile
mbcs.c
mbcs.h
mem.c mem_class: fix bug 2009-09-15 09:50:47 -07:00
misc.c
mmtimer.c
moxa.c
moxa.h
mspec.c
mxser.c
mxser.h
n_hdlc.c
n_r3964.c
n_tty.c n_tty: do O_ONLCR translation as a single write 2009-09-05 12:46:07 -07:00
nozomi.c tty: fix chars_in_buffers 2009-07-20 16:38:43 -07:00
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c
pty.c pty_write: don't do a tty_wakeup() when the buffers are full 2009-09-18 07:05:58 -07:00
random.c
raw.c vfs: Rename generic_file_aio_write_nolock 2009-09-14 17:08:15 +02:00
riscom8.c
riscom8.h
riscom8_reg.h
rocket.c
rocket.h
rocket_int.h
rtc.c
scc.h
scx200_gpio.c
selection.c
ser_a2232.c
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c cleanup console_print() 2009-09-14 17:41:42 -07:00
snsc.c
snsc.h
snsc_event.c
sonypi.c
specialix.c specialix.c: convert nested spin_lock_irqsave to spin_lock 2009-07-20 16:38:43 -07:00
specialix_io8.h
stallion.c
sx.c
sx.h
sxboards.h
sxwindow.h
synclink.c hdlc: convert to netdev_tx_t 2009-09-01 01:13:31 -07:00
synclink_gt.c hdlc: convert to netdev_tx_t 2009-09-01 01:13:31 -07:00
synclinkmp.c hdlc: convert to netdev_tx_t 2009-09-01 01:13:31 -07:00
sysrq.c debug lockups: Improve lockup detection, fix generic arch fallback 2009-08-03 09:56:52 +02:00
tb0219.c
tlclk.c
toshiba.c
tty_audit.c
tty_buffer.c pty: avoid forcing 'low_latency' tty flag 2009-07-29 12:15:56 -07:00
tty_io.c
tty_ioctl.c
tty_ldisc.c tty: make sure to flush any pending work when halting the ldisc 2009-08-25 09:12:43 -07:00
tty_port.c tty_port: Fix return on interrupted use 2009-07-17 08:50:43 -07:00
vc_screen.c vc: create vcs(a) devices for consoles 2009-07-20 16:38:43 -07:00
viotape.c
virtio_console.c
vme_scc.c
vt.c sparc: Kill PROM console driver. 2009-09-15 17:04:38 -07:00
vt_ioctl.c