linux/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 [PATCH] I2C: Kill address ranges in non-sensors i2c chip drivers 2005-06-21 21:51:48 -07:00
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 [ATM]: [drivers] kill pointless NULL checks and casts before kfree() 2005-06-02 13:04:07 -07:00
base [PATCH] Driver core: Use klist_del() instead of klist_remove(). 2005-06-29 22:48:05 -07:00
block [PATCH] Fix get_request nastiness 2005-06-29 08:46:30 -07:00
bluetooth [PATCH] pcmcia: id_table for dtl1_cs.c 2005-06-27 18:03:15 -07:00
cdrom [PATCH] drivers/cdrom/cm206.c: cleanups 2005-06-25 16:25:07 -07:00
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 [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks 2005-06-20 15:15:32 -07:00
eisa [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks 2005-06-20 15:15:32 -07:00
fc4 fc4/fc: fix warnings and errors related to recent SCSI EH updates 2005-06-19 21:47:56 -04:00
firmware [IA64-SGI] pcdp: add PCDP pci interface support 2005-06-28 09:09:06 -07:00
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 [PATCH] IB: Fix pack/unpack when size_bits == 64 2005-06-27 15:11:47 -07:00
input [PATCH] x86: i8253/i8259A lock cleanup 2005-06-30 08:45:10 -07:00
isdn [PATCH] drivers/isdn/: make some code static 2005-06-28 21:20:31 -07:00
macintosh [PATCH] openfirmware: implement hotplug for macio devices 2005-07-06 12:55:20 -07:00
mca [PATCH] unexport mca_find_device_by_slot 2005-06-25 16:24:56 -07:00
md [PATCH] md: bio leak fix 2005-06-28 14:53:41 -07:00
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 [PATCH] ibmasm driver: fix race in command refcount logic 2005-06-21 19:07:35 -07:00
mmc [PATCH] MMC: wbsd cleanups 2005-07-01 13:07:37 +01:00
mtd [PATCH] ARM: 2780/1: AFS partition length calculation fix 2005-06-30 23:01:09 +01:00
net [PATCH] pm: more u32 vs. pm_message_t fixes 2005-07-07 18:23:43 -07:00
nubus Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
oprofile [PATCH] oprofile: report anonymous region samples 2005-06-24 00:06:27 -07:00
parisc [PATCH] acpi bridge hotadd: ACPI based root bridge hot-add 2005-06-27 21:52:39 -07:00
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 [PATCH] pcmcia: fix modalias attribute in sysfs 2005-06-30 08:45:08 -07:00
pnp [PATCH] Cleanup patch for process freezing 2005-06-25 17:10:13 -07:00
s390 [PATCH] s390: debug feature changes 2005-06-25 16:24:37 -07:00
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 [PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks 2005-06-20 15:15:35 -07:00
sn [PATCH] ioc4: PCI bus speed detection 2005-06-21 18:46:32 -07:00
tc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
telephony [PATCH] pcmcia: id_table for ixj_pcmcia.c 2005-06-27 18:03:16 -07:00
usb [PATCH] pcmcia id_table for sl811.cs 2005-06-27 18:03:17 -07:00
video [PATCH] pm: more u32 vs. pm_message_t fixes 2005-07-07 18:23:43 -07:00
w1 [PATCH] Cleanup patch for process freezing 2005-06-25 17:10:13 -07:00
zorro [PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update device attribute callbacks 2005-06-20 15:15:35 -07:00
Kconfig [PATCH] ioc4: CONFIG split 2005-06-21 18:46:32 -07:00
Makefile [PATCH] ioc4: CONFIG split 2005-06-21 18:46:32 -07:00