linux-uconsole/drivers
Jeff Garzik 04518bfe8e [PATCH] ISDN: fix drivers, by handling errors thrown by ->readstat()
This is a particularly ugly on-failure bug, possibly security, since the
lack of error handling here is covering up another class of bug: failure to
handle copy_to_user() return values.

The I4L API function ->readstat() returns an integer, and by looking at
several existing driver implementations, it is clear that a negative return
value was meant to indicate an error.

Given that several drivers already return a negative value indicating an
errno-style error, the current code would blindly accept that [negative]
value as a valid amount of bytes read.  Obvious damage ensues.

Correcting ->readstat() handling to properly notice errors fixes the
existing code to work correctly on error, and enables future patches to
more easily indicate errors during operation.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Cc: Karsten Keil <kkeil@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:49 -07:00
..
acorn
acpi [PATCH] acpi_processor_latency_notifier(): UP warning fix 2006-10-17 08:18:44 -07:00
amba
ata
atm
base
block [PATCH] rd: memory leak on rd_init() failure 2006-10-17 08:18:48 -07:00
bluetooth [Bluetooth] Use work queue to trigger URB submission 2006-10-15 23:14:35 -07:00
cdrom
char [PATCH] epca: prevent panic on tty_register_driver() failure 2006-10-17 08:18:48 -07:00
clocksource
connector
cpufreq
crypto
dio
dma
edac
eisa [PATCH] EISA: handle sysfs errors 2006-10-11 11:14:25 -07:00
fc4
firmware [PATCH] firmware/efivars: handle error 2006-10-11 11:14:25 -07:00
hwmon
i2c
ide [PATCH] ioc4: Enable build on non-SN2 2006-10-17 08:18:42 -07:00
ieee1394
infiniband
input [PATCH] hp drivers/input stuff: C99 initializers, NULL noise removal, __user annotations 2006-10-15 11:00:58 -07:00
isdn [PATCH] ISDN: fix drivers, by handling errors thrown by ->readstat() 2006-10-17 08:18:49 -07:00
leds [PATCH] drivers/led: handle sysfs errors 2006-10-17 08:18:46 -07:00
macintosh
mca [PATCH] drivers/mca: handle sysfs errors 2006-10-11 11:14:25 -07:00
md [PATCH] md: fix /proc/mdstat refcounting 2006-10-17 08:18:43 -07:00
media V4L/DVB (4750): AGC command1/2 is board specific 2006-10-14 00:44:29 -03:00
message [PATCH] I2O: handle a few sysfs errors 2006-10-17 08:18:46 -07:00
mfd
misc [PATCH] ioc4: Enable build on non-SN2 2006-10-17 08:18:42 -07:00
mmc
mtd
net Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2006-10-11 11:19:30 -07:00
nubus
oprofile
parisc
parport
pci [PATCH] HT_IRQ must depend on PCI 2006-10-11 11:14:23 -07:00
pcmcia
pnp
rapidio
rtc [PATCH] rtc: fix printk of 64-bit res on 32-bit platform 2006-10-17 08:18:47 -07:00
s390
sbus [PATCH] more kernel_execve() fallout (sbus) 2006-10-12 12:36:55 -07:00
scsi [PATCH] scsi: megaraid_{mm,mbox}: 64-bit DMA capability fix 2006-10-16 08:30:04 -07:00
serial [PATCH] ioc4: Enable build on non-SN2 2006-10-17 08:18:42 -07:00
sh
sn [PATCH] ioc4: Enable build on non-SN2 2006-10-17 08:18:42 -07:00
spi
tc
telephony
usb
video [PATCH] revert "nvidiafb: use generic ddc reading" 2006-10-11 11:14:14 -07:00
w1 [PATCH] w1 kconfig fix 2006-10-17 08:18:44 -07:00
zorro
Kconfig [PATCH] ioc4: Enable build on non-SN2 2006-10-17 08:18:42 -07:00
Makefile