From: Andre Noll Date: Mon, 21 Jul 2008 04:42:07 +0000 (+1000) Subject: md: Fix check for overlapping devices. X-Git-Tag: v2.6.27-rc1~957^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d07bd3bcc456228b56a790897162a634691fed9b;p=pandora-kernel.git md: Fix check for overlapping devices. The checks in overlaps() expect all parameters either in block-based or sector-based quantities. However, its single caller passes two rdev->data_offset arguments as well as two rdev->size arguments, the former being sector counts while the latter are measured in 1K blocks. This could cause rdev_size_store() to accept an invalid size from user space. Fix it by passing only sector-based quantities to overlaps(). Signed-off-by: Andre Noll Signed-off-by: NeilBrown --- Reading git-diff-tree failed