]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Fix off-by-one error in validation of write_mostly.
authorJonthan Brassow <jbrassow@redhat.com>
Tue, 9 Aug 2011 23:13:33 +0000 (09:13 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 9 Aug 2011 23:17:56 +0000 (09:17 +1000)
commita16a20ae2e99e4e2f53e8f3383b4626ac3a2db8d
tree69fa96950637d77fb6d68dd91dd55f25330d27af
parentd74c1c9e1b52c03f90c8c6d4f323f320cb33be6f
Fix off-by-one error in validation of write_mostly.

The user-supplied value given for the 'write_mostly' argument must be an
index starting at 0.  The validation of the supplied argument failed to
check for 'N' ('>' vs '>='), which would have caused an access beyond the
end of the array.

Reported-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-raid.c