From: Mikulas Patocka Date: Sat, 23 Nov 2013 00:52:06 +0000 (-0500) Subject: dm table: fail dm_table_create on dm_round_up overflow X-Git-Tag: v3.13-rc4~11^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b2d06576c5410c10d95adfd5c4d8b24de861d87;p=pandora-kernel.git dm table: fail dm_table_create on dm_round_up overflow The dm_round_up function may overflow to zero. In this case, dm_table_create() must fail rather than go on to allocate an empty array with alloc_targets(). This fixes a possible memory corruption that could be caused by passing too large a number in "param->target_count". Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org --- Reading git-diff-tree failed