Commit fc76a7a6 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: Fix simple off-by-one error in md driver.

parent 7fc0cdd1
......@@ -1476,7 +1476,7 @@ static int run (mddev_t *mddev)
ITERATE_RDEV(mddev,rdev,tmp) {
raid_disk = rdev->raid_disk;
if (raid_disk > mddev->raid_disks
if (raid_disk >= mddev->raid_disks
|| raid_disk < 0)
continue;
disk = conf->disks + raid_disk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment