Commit d63c7745 authored by Nikanth Karthikesan's avatar Nikanth Karthikesan Committed by Greg Kroah-Hartman

linear: correct disk numbering error check

[ Upstream commit 13864515 ]

From: "Nikanth Karthikesan" <knikanth@novell.com>

Correct disk numbering problem check.
Signed-off-by: default avatarNikanth Karthikesan <knikanth@suse.de>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
CC: Oliver Pinter <oliver.pntr@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1e692471
......@@ -126,7 +126,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
int j = rdev->raid_disk;
dev_info_t *disk = conf->disks + j;
if (j < 0 || j > raid_disks || disk->rdev) {
if (j < 0 || j >= raid_disks || disk->rdev) {
printk("linear: disk numbering problem. Aborting!\n");
goto out;
}
......
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