linux/drivers
Andre Noll 852c8bf484 md: Fix a bug in linear.c causing which_dev() to return the wrong device.
ab5bd5cbc8 introduced the following
bug in linear software raid for large arrays on 32 bit machines:

which_dev() computes the device holding a given sector by shifting
down the sector number to a 32 bit range, dividing by the array
spacing and looking up the resulting index in the hash table of
the array.

Because the computed index might be slightly too small, a loop at
the end of which_dev() increases the index until the given sector
actually falls into the range of the device associated with that index.

The changes of the above mentioned commit caused this loop to check
whether the _index_ rather than the sector number is small enough,
effectively bypassing the loop and thus possibly returning the wrong
device.

As reported by Simon Kirby, this leads to errors such as

	linear_make_request: Sector 2340486136 out of bounds on dev sdi: 156301312 sectors, offset 2109870464

Fix this bug by introducing a local variable for the index so that
the variable containing the passed sector is left unchanged.

Cc: stable@kernel.org
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2009-02-06 15:10:52 +11:00
..
accessibility
acpi Merge branch 'misc' into release 2009-01-16 14:45:34 -05:00
amba [ARM] Fix realview build 2009-01-08 16:29:41 +00:00
ata Fix my email address in qd65xx.[ch]/pata_qdi.c 2009-02-03 16:53:56 -08:00
atm generic swap(): iphase: rename swap() to swap_byte_order() 2009-01-08 08:31:14 -08:00
auxdisplay
base driver-core: fix kernel-doc parameter name 2009-01-28 15:55:48 -08:00
block powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block 2009-01-16 16:15:13 +11:00
bluetooth
cdrom
char Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-02-03 16:52:10 -08:00
clocksource
connector
cpufreq Merge branch 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-10 06:12:18 -08:00
cpuidle
crypto
dca dca: redesign locks to fix deadlocks 2009-02-02 23:26:57 -08:00
dio m68k: dio - Kill resource_size_t format warnings 2009-01-12 20:56:42 +01:00
dma i.MX31: Image Processing Unit DMA and IRQ drivers 2009-01-19 15:36:21 -07:00
edac powerpc: More printing warning fixes for the l64 to ll64 conversion 2009-01-28 17:15:52 +11:00
eisa
firewire firewire: sbp2: add workarounds for 2nd and 3rd generation iPods 2009-01-29 20:19:48 +01:00
firmware DMI: Introduce dmi_first_match to make the interface more flexible 2009-01-27 02:15:47 -05:00
gpio gpiolib: fix request related issue 2009-01-29 18:04:43 -08:00
gpu Stop playing silly games with the VM_ACCOUNT flag 2009-01-31 15:08:56 -08:00
hid HID: document difference between hid_blacklist and hid_ignore_list 2009-01-29 11:23:12 +01:00
hwmon hwmon: applesmc: add support for MacPro 3 temperature sensors 2009-01-29 18:04:45 -08:00
i2c i2c: Move old eeprom driver to /drivers/misc/eeprom 2009-01-26 21:19:53 +01:00
ide Fix my email address in qd65xx.[ch]/pata_qdi.c 2009-02-03 16:53:56 -08:00
idle
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-01-29 18:09:41 -08:00
infiniband Merge branches 'ehca', 'ipoib' and 'mlx4' into for-linus 2009-01-16 15:05:54 -08:00
input input: PCF50633 input driver 2009-01-11 01:34:25 +01:00
isdn isdn: Fix missing ifdef in isdn_ppp 2009-01-26 12:24:38 -08:00
leds lis3lv02d: merge with leds hp disk 2009-01-15 16:39:40 -08:00
lguest lguest: Fix a memory leak with the lg object during launcher close 2009-01-30 11:34:11 +10:30
macintosh Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
mca
md md: Fix a bug in linear.c causing which_dev() to return the wrong device. 2009-02-06 15:10:52 +11:00
media V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning 2009-02-01 10:41:02 -02:00
memstick memstick: annotate endianness of attribute structs 2009-01-09 16:54:41 -08:00
message [SCSI] mpt fusion: Add Firmware debug support 2009-01-13 10:36:02 -06:00
mfd mfd: Remove non exported references from pcf50633 2009-01-15 11:50:58 +01:00
misc sgi-xp: link XPNET's net_device_ops to its net_device structure 2009-02-03 15:16:48 -08:00
mmc pxamci: enable DMA for write ops after CMD/RESP 2009-02-02 20:57:07 +01:00
mtd Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-02-03 16:52:10 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-02-04 07:52:21 -08:00
nubus
of drivers/of: Add the of_find_i2c_device_by_node function. 2009-01-09 15:49:06 -07:00
oprofile oprofile: fix uninitialized use of struct op_entry 2009-01-17 17:26:39 +01:00
parisc Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
parport parport: ieee1284: use del_timer_sync() in parport_wait_event() 2009-01-06 15:59:31 -08:00
pci PCI hotplug: Change link order of pciehp & acpiphp 2009-01-27 15:35:51 -08:00
pcmcia powerpc: Change u64/s64 to a long long integer type 2009-01-13 14:47:59 +11:00
platform hp-wmi: set initial docking state 2009-01-29 18:04:45 -08:00
pnp Merge branch 'linus' into release 2009-01-09 03:39:43 -05:00
power power_supply: pda_power: Don't request shared IRQs w/ IRQF_DISABLED 2009-01-26 02:09:26 +03:00
ps3 powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3 2009-01-16 16:15:14 +11:00
rapidio rapidio: remove excess kernel-doc notation 2009-01-06 15:59:28 -08:00
regulator leds: Fix bounds checking of wm8350->pmic.led 2009-01-30 21:50:49 +00:00
rtc rtc: rtc-twl4030 don't mask alarm interrupts on shutdown 2009-01-15 16:39:36 -08:00
s390 lcs: fix compilation for !CONFIG_IP_MULTICAST 2009-01-25 17:59:26 -08:00
sbus
scsi [SCSI] ibmvfc: Fix DMA mapping leak on memory allocation failure 2009-01-25 08:14:53 -06:00
serial Add enable_ms to jsm driver 2009-01-30 08:40:54 -08:00
sh
sn
spi spi: Move at25 (for SPI eeproms) to /drivers/misc/eeprom 2009-01-26 21:19:54 +01:00
ssb
staging Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
tc
telephony
thermal
uio
usb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream 2009-02-02 17:52:39 +00:00
uwb uwb: lock rc->rsvs_lock with spin_lock_bh() 2009-01-23 12:57:20 +00:00
video Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-02-02 19:26:44 -08:00
virtio virtio-pci: do not oops on config change if driver not loaded 2009-02-02 19:17:56 -08:00
w1 w1: send status messages after command processing 2009-01-08 08:31:14 -08:00
watchdog [ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms 2009-01-24 16:48:42 +00:00
xen xen: make sysfs files behave as their names suggest 2009-01-29 13:20:36 +01:00
zorro m68k: zorro - Use %pR to print resources 2009-01-12 20:56:43 +01:00
Kconfig
Makefile Merge branch 'drivers-platform' into release 2009-01-09 04:56:56 -05:00