From: Ben Collins Date: Thu, 5 Jun 2008 23:10:21 +0000 (-0400) Subject: mmc: Fix crash in mmc_block on 64-bit X-Git-Tag: v2.6.26-rc6~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=203c80187eba037f2d6562e0d5847014746726dd;p=platform%2Fupstream%2Fkernel-adaptation-pc.git mmc: 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: Signed-off-by: Ben Collins Acked-by: Pierre Ossman Signed-off-by: Linus Torvalds --- diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 91ded3e..f9ad960 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -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.