]> 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>
Thu, 27 Sep 2012 02:37:26 +0000 (12:37 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:26 +0000 (12:37 +1000)
commitea9457ef5c50e2af87e55cdea8aedda45f9bacff
treee6ecc63280428b5c7433cd5f632095011836a00e
parent300f9eeb7200b3eff6195b02af160dceb4f5b497
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