]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtdoops: fix the oops_page_used array size
authorRoman Tereshonkov <roman.tereshonkov@nokia.com>
Tue, 29 Nov 2011 10:49:18 +0000 (12:49 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Thu, 8 Dec 2011 21:57:30 +0000 (23:57 +0200)
commitaf64b37f63189cef7575fb3f8e670df767c3e15b
tree29d782726471123e53e232e4f2ac12dd9e985272
parentac3ba24a3539a9fe63cb8e23ceb55a7468d778ae
mtdoops: fix the oops_page_used array size

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.

Cc: stable@kernel.org
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
drivers/mtd/mtdoops.c