diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-16 01:07:24 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-16 01:07:24 +0000 |
commit | 95db6b748fc86297827fbd9c9ef174d491c9ad89 (patch) | |
tree | 27a92a942821cde1edda9a1b088718d436b3efe4 /drivers/block/raid0.c | |
parent | 45b27b0a0652331d104c953a5b192d843fff88f8 (diff) |
Merge with Linux 2.3.40.
Diffstat (limited to 'drivers/block/raid0.c')
-rw-r--r-- | drivers/block/raid0.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/raid0.c b/drivers/block/raid0.c index 2e95d34f8..37b2035cd 100644 --- a/drivers/block/raid0.c +++ b/drivers/block/raid0.c @@ -182,6 +182,12 @@ static int raid0_map (struct md_dev *mddev, kdev_t *rdev, 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) { |