kernel-ark/drivers
Roman Zippel d6afe27bff [PATCH] tty output lossage fix
The patch fixes a few corner cases around tty line editing with
very long input lines:

- n_tty_receive_char(): don't simply drop eol characters,
  otherwise canon_data isn't increased and the reader isn't woken
  up.

- n_tty_receive_room(): If there is no newline pending and the
  edit buffer is full, allow only a single character to be written
  (until eol is found and the line is flushed), so characters from
  the next line aren't dropped.

- write_chan(): if an incomplete line was written, continue
  writing until write() returns 0, otherwise it might not write
  the eol character to flush the line and the writer goes to sleep
  without ever being woken up.

BTW the core problem is that part of this should be handled in the
receive_buf path, but for this it has to return the number of
written characters, as the amount of written characters may not be
the same as the amount of characters going into the write buffer,
so the receive_room() usage in pty_write() is not really reliable.

Alan said:

The problem looks valid. The behaviour of 'traditional unix' appears to
be the following

	If you exceed the line limit then beep and drop the character
	Always allow EOL to complete a canonical line input
	Always do signal/control processing if enabled

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:23:45 -07:00
..
acorn
acpi If ACPI doesn't find an irq listed, don't accept 0 as a valid PCI irq. 2005-07-02 10:35:33 -07:00
atm
base
block
bluetooth
cdrom
char [PATCH] tty output lossage fix 2005-07-07 18:23:45 -07:00
cpufreq [PATCH] pm: fix u32 vs. pm_message_t confusion in cpufreq 2005-07-07 18:23:43 -07:00
crypto [CRYPTO] Update IV correctly for Padlock CBC encryption 2005-07-06 13:54:09 -07:00
dio
eisa
fc4
firmware
i2c [PATCH] openfirmware: generate device table for userspace 2005-07-06 12:55:20 -07:00
ide [PATCH] openfirmware: generate device table for userspace 2005-07-06 12:55:20 -07:00
ieee1394 ieee1394: fix broken signed char assumption. 2005-07-06 13:05:50 -07:00
infiniband
input
isdn
macintosh [PATCH] openfirmware: implement hotplug for macio devices 2005-07-06 12:55:20 -07:00
mca
md
media [DVB]: Do not include <linux/irq.h> from drivers. 2005-07-06 15:41:17 -07:00
message [PATCH] pm: more u32 vs. pm_message_t fixes 2005-07-07 18:23:43 -07:00
misc
mmc [PATCH] MMC: wbsd cleanups 2005-07-01 13:07:37 +01:00
mtd
net [PATCH] pm: more u32 vs. pm_message_t fixes 2005-07-07 18:23:43 -07:00
nubus
oprofile
parisc
parport [PATCH] PCI: clean up dynamic pci id logic 2005-07-01 13:35:50 -07:00
pci [PATCH] pm: more u32 vs. pm_message_t fixes 2005-07-07 18:23:43 -07:00
pcmcia
pnp
s390
sbus [SPARC]: bpp: remove sleep_on usage 2005-07-04 13:24:14 -07:00
scsi [PATCH] openfirmware: generate device table for userspace 2005-07-06 12:55:20 -07:00
serial [PATCH] openfirmware: generate device table for userspace 2005-07-06 12:55:20 -07:00
sh
sn
tc
telephony
usb
video [PATCH] pm: more u32 vs. pm_message_t fixes 2005-07-07 18:23:43 -07:00
w1
zorro
Kconfig
Makefile