From: NeilBrown Date: Fri, 26 Jan 2007 08:57:03 +0000 (-0800) Subject: [PATCH] md: avoid reading past the end of a bitmap file X-Git-Tag: v2.6.20-rc7~74 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f49d5e62d9352d33b30c9befbaf0fd9c88265ec1;p=pandora-kernel.git [PATCH] md: avoid reading past the end of a bitmap file In most cases we check the size of the bitmap file before reading data from it. However when reading the superblock, we always read the first PAGE_SIZE bytes, which might not always be appropriate. So limit that read to the size of the file if appropriate. Also, we get the count of available bytes wrong in one place, so that too can read past the end of the file. Cc: "yang yin" Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed