]> git.karo-electronics.de Git - karo-tx-linux.git/commit
DM RAID: Fix comparison of index and quantity for "rebuild" parameter
authorJonathan Brassow <jbrassow@redhat.com>
Mon, 24 Sep 2012 06:41:29 +0000 (16:41 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 24 Sep 2012 06:41:29 +0000 (16:41 +1000)
commit4a86dcd8cad8b12907fd05ea66b57634cda15351
tree72adb6e495de2aace293cc8eb804d2c559986268
parenta9aa81871286c90b8b93f0a187034096ba135c43
DM RAID: Fix comparison of index and quantity for "rebuild" parameter

DM RAID: Fix comparison of index and quantity for "rebuild" parameter

The "rebuild" parameter takes an index argument that starts counting from
zero.  The conditional used to validate the index was using '>' rather than
'>=', leaving the door open for an index value that would be 1 too large.

Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/dm-raid.c