mtdoops: fix the oops_page_used array size
commit63f0d35a610b2ef1139b5d763ee74cab5257a8c8
authorRoman Tereshonkov <roman.tereshonkov@nokia.com>
Tue, 29 Nov 2011 10:49:18 +0000 (29 12:49 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Jan 2012 01:24:32 +0000 (25 17:24 -0800)
tree112893d2550d2aa704f3e0d5dd2f48a489cae3f7
parente9d23be2708477feeaec78e707c80441520c1ef6
mtdoops: fix the oops_page_used array size

commit 556f063580db2953a7e53cd46b47724246320f60 upstream.

The array of unsigned long pointed by oops_page_used is allocated
by vmalloc which requires the size to be in bytes.

BITS_PER_LONG is equal to 32.
If we want to allocate memory for 32 pages with one bit per page then
32 / BITS_PER_LONG  is equal to 1 byte that is 8 bits.
To fix it we need to multiply the result by sizeof(unsigned long) equal to 4.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mtd/mtdoops.c