kernel-ark/drivers/md
NeilBrown 5c4c33318d [PATCH] md: fix possible oops when starting a raid0 array
This loop that sets up the hash_table has problems.

Careful examination will show that the last time through, everything but
the first line is pointless.  This is because all it does is change 'cur'
and 'size' and neither of these are used after the loop.  This should ring
warning bells...  That last time through the loop,

        size += conf->strip_zone[cur].size

can index off the end of the strip_zone array.  Depending on what it finds
there, it might exit the loop cleanly, or it might spin going further and
further beyond the array until it hits an unmapped address.

This patch rearranges the code so that the last, pointless, iteration of
the loop never happens.  i.e.  the one statement of the last loop that is
needed is moved the the end of the previous loop - or to before the loop
starts - and the loop counter starts from 1 instead of 0.

Cc: "Don Dupuis" <dondster@gmail.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-23 10:35:31 -07:00
..
raid6test
.gitignore
bitmap.c
dm-bio-list.h
dm-bio-record.h
dm-crypt.c
dm-emc.c
dm-exception-store.c
dm-hw-handler.c
dm-hw-handler.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-io.c
dm-io.h
dm-ioctl.c
dm-linear.c
dm-log.c
dm-log.h
dm-mpath.c
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-raid1.c [PATCH] dm: remove SECTOR_FORMAT 2006-03-27 08:44:58 -08:00
dm-round-robin.c
dm-snap.c
dm-snap.h
dm-stripe.c
dm-table.c
dm-target.c
dm-zero.c
dm.c
dm.h
faulty.c
Kconfig
kcopyd.c
kcopyd.h
linear.c
Makefile
md.c [PATCH] md: Fix inverted test for 'repair' directive. 2006-05-21 12:59:17 -07:00
mktables.c
multipath.c
raid0.c [PATCH] md: fix possible oops when starting a raid0 array 2006-05-23 10:35:31 -07:00
raid1.c [PATCH] md: Fix 'rdev->nr_pending' count when retrying barrier requests 2006-05-01 18:17:42 -07:00
raid5.c
raid6.h [PATCH] RAID6 Altivec fix 2005-09-17 11:49:58 -07:00
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6main.c
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c [PATCH] md: Fixed refcounting/locking when attempting read error correction in raid10 2006-05-01 18:17:42 -07:00
unroll.pl
xor.c