mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 00:38:55 +00:00
linear: correct disk numbering error check
From: "Nikanth Karthikesan" <knikanth@novell.com> Correct disk numbering problem check. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
parent
9bbbca3a0e
commit
13864515f7
@ -126,7 +126,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
|
|||||||
int j = rdev->raid_disk;
|
int j = rdev->raid_disk;
|
||||||
dev_info_t *disk = conf->disks + j;
|
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");
|
printk("linear: disk numbering problem. Aborting!\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user