From: Nikanth Karthikesan Date: Tue, 16 Feb 2010 18:42:47 +0000 (+0000) Subject: dm stripe: avoid divide by zero with invalid stripe count X-Git-Tag: v2.6.33~39^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=781248c1b50c776a9ef4be1130f84ced1cba42fe;p=pandora-kernel.git dm stripe: avoid divide by zero with invalid stripe count If a table containing zero as stripe count is passed into stripe_ctr the code attempts to divide by zero. This patch changes DM_TABLE_LOAD to return -EINVAL if the stripe count is zero. We now get the following error messages: device-mapper: table: 253:0: striped: Invalid stripe count device-mapper: ioctl: error adding target to table Signed-off-by: Nikanth Karthikesan Cc: stable@kernel.org Signed-off-by: Alasdair G Kergon --- Reading git-diff-tree failed