patch-2.3.40 linux/drivers/block/raid0.c
Next file: linux/drivers/block/rd.c
Previous file: linux/drivers/block/ps2esdi.c
Back to the patch index
Back to the overall index
- Lines: 13
- Date:
Thu Jan 20 10:44:46 2000
- Orig file:
v2.3.39/linux/drivers/block/raid0.c
- Orig date:
Fri May 8 00:17:13 1998
diff -u --recursive --new-file v2.3.39/linux/drivers/block/raid0.c linux/drivers/block/raid0.c
@@ -182,6 +182,12 @@
block=*rsector >> 1;
hash=data->hash_table+(block/data->smallest->size);
+ if (hash - data->hash_table > data->nr_zones)
+ {
+ printk(KERN_DEBUG "raid0_map: invalid block %ul\n", block);
+ return -1;
+ }
+
/* Sanity check */
if ((chunk_size*2)<(*rsector % (chunk_size*2))+size)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)