FIx crash in mmc_block on 64-bit
PATCH 1/1 FIx crash in mmc_block on 64-bit
Fairly simple. "dev_use" was being allocated as a zero length array because of bad math on 64-bit systems causing a crash in find_first_zero_bit(). One-liner follows:
drivers/mmc/card/block.c +1 -1
@@ -46,7 +46,7 @@#define MMC_SHIFT 3#define MMC_NUM_MINORS (256 >> MMC_SHIFT) -static unsigned long dev_use[MMC_NUM_MINORS /(8 *sizeof (unsigned long ))]; +static DECLARE_BITMAP(dev_use, MMC_NUM_MINORS);/* * There is one mmc_blk_data per slot.
Quoted 4 lines · On Mon, 02 Jun 2008 13:39:19 -0400 Ben Collins <[email protected]>…
Fairly simple. "
dev_use" was being allocated as a zero length array because of bad math on 64-bit systems causing a crash infind_first_zero_bit(). One-liner follows:
A signed-off-by to make things nice and proper, please. :)
You can add an Acked-by: Pierre Ossman <[email protected]> and pass it on directly to Linus.
Rgds
Signature · 4 lines
-- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org rdesktop, core developer http://www.rdesktop.org
Quoted 8 lines · Pierre Ossman
Quoted 4 lines · On Mon, 02 Jun 2008 13:39:19 -0400 Ben Collins <[email protected]>…
Fairly simple. "
dev_use" was being allocated as a zero length array because of bad math on 64-bit systems causing a crash infind_first_zero_bit(). One-liner follows:
Quoted 4 lines
A signed-off-by to make things nice and proper, please. :)
You can add an Acked-by: Pierre Ossman <[email protected]> and pass it on directly to Linus.
Not sure how I missed the signed-off-by, but resent to Linus with your ack. Thanks