]> git.baikalelectronics.ru Git - kernel.git/commit
DM RAID: Fix comparison of index and quantity for "rebuild" parameter
authorJonathan Brassow <jbrassow@redhat.com>
Thu, 11 Oct 2012 02:40:36 +0000 (13:40 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 11 Oct 2012 02:40:36 +0000 (13:40 +1100)
commit19c80ff4f40d50e2457ec0f33907787fc4a90b3a
treef9a9db7769a86450ccdda52fa64c2ee7f74b709e
parentd49d69c3ebb5e9663a528f5612007c2ba252ceb0
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