android_kernel_xiaomi_sm8350/drivers
Kevin Corry 8ba32fde2c [PATCH] dm stripe: Fix bounds
The dm-stripe target currently does not enforce that the size of a stripe
device be a multiple of the chunk-size.  Under certain conditions, this can
lead to I/O requests going off the end of an underlying device.  This
test-case shows one example.

echo "0 100 linear /dev/hdb1 0" | dmsetup create linear0
echo "0 100 linear /dev/hdb1 100" | dmsetup create linear1
echo "0 200 striped 2 32 /dev/mapper/linear0 0 /dev/mapper/linear1 0" | \
   dmsetup create stripe0
dd if=/dev/zero of=/dev/mapper/stripe0 bs=1k

This will produce the output:
dd: writing '/dev/mapper/stripe0': Input/output error
97+0 records in
96+0 records out

And in the kernel log will be:
attempt to access beyond end of device
dm-0: rw=0, want=104, limit=100

The patch will check that the table size is a multiple of the stripe
chunk-size when the table is created, which will prevent the above striped
device from being created.

This should not affect tools like LVM or EVMS, since in all the cases I can
think of, striped devices are always created with the sizes being a
multiple of the chunk-size.

The size of a stripe device must be a multiple of its chunk-size.

(akpm: that typecast is quite gratuitous)

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-17 07:51:25 -08:00
..
acorn
acpi [PATCH] x86_64: Disable ACPI blacklist by year for now on x86-64 2006-02-26 09:53:30 -08:00
amba
atm [ATM]: [fore200e] fix section mismatch warnings 2006-03-04 21:06:27 -08:00
base
block [PATCH] dac960: add disk entropy in request completions 2006-03-08 14:15:04 -08:00
bluetooth
cdrom
char [IA64] SGI SN drivers: don't report !sn2 hardware as an error 2006-03-07 15:27:59 -08:00
connector
cpufreq
crypto [PATCH] padlock: Fix typo that broke 256-bit keys 2006-02-22 07:47:07 -08:00
dio
edac [PATCH] EDAC: disable sysfs interface 2006-03-14 07:57:18 -08:00
eisa
fc4 [PATCH] drivers/fc4/fc.c: memset correct length 2006-02-20 20:00:11 -08:00
firmware [PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit 2006-03-09 19:47:36 -08:00
hwmon [PATCH] it87: Fix oops on removal 2006-02-13 22:30:10 -08:00
i2c [PATCH] i2c: Drop outdated probe/remove code in i2c-isa 2006-02-13 22:30:10 -08:00
ide [PATCH] pcmcia: add another ide-cs CF card id 2006-03-01 10:52:12 +01:00
ieee1394 [PATCH] video1394: fix "return E;" typo 2006-02-28 20:53:43 -08:00
infiniband IB/srp: Don't send task management commands after target removal 2006-03-03 17:50:16 -08:00
input [PATCH] Input: psmouse - disable autoresync 2006-03-10 22:09:33 -08:00
isdn [PATCH] i4l: fix compatiblity issue with big endian systems 2006-03-06 18:40:43 -08:00
macintosh [PATCH] macintosh: correct AC Power info in /proc/pmu/info 2006-03-14 07:57:17 -08:00
mca
md [PATCH] dm stripe: Fix bounds 2006-03-17 07:51:25 -08:00
media [PATCH] Restore tuning capabilities in V4L2 MXB driver 2006-03-14 07:57:17 -08:00
message Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2006-02-16 12:47:44 -08:00
mfd
misc [PATCH] ibmasm: use after free fix 2006-03-09 19:47:37 -08:00
mmc [MMC] au1xmmc: Fix a compilation warning ('status' is not used) 2006-03-04 23:02:10 +00:00
mtd [PATCH] mtd_dataflash, fix block vs page erase 2006-03-14 07:57:17 -08:00
net [netdrvr] fix array overflows in Chelsio driver 2006-03-16 19:20:40 -05:00
nubus
oprofile
parisc
parport [SERIAL] Fix two bugs in parport_serial 2006-03-05 21:25:40 +00:00
pci
pcmcia [PATCH] fix pcmcia_device_probe oops 2006-03-10 13:40:26 -08:00
pnp [PATCH] pnp bus type fix 2006-02-28 20:53:43 -08:00
rapidio
s390 [PATCH] "s390: multiple subchannel sets support" fix 2006-03-14 21:43:02 -08:00
sbus
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2006-03-14 11:03:50 -08:00
serial [PATCH] Altix: small ioc4 oversight 2006-03-11 09:19:34 -08:00
sh
sn Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-02-28 20:56:24 -08:00
spi [PATCH] spi: Fix modular master driver remove and device suspend/remove 2006-02-20 20:00:09 -08:00
tc
telephony
usb [PATCH] USB Serial: fix use-after-free bug in usb-serial core 2006-03-06 13:29:00 -08:00
video [PATCH] radeonfb: Fix static array overrun 2006-03-11 09:19:36 -08:00
w1
zorro
Kconfig
Makefile