提交 203c8018 编写于 作者: B Ben Collins 提交者: Linus Torvalds

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: NBen Collins <ben.collins@canonical.com>
Acked-by: NPierre Ossman <drzeus@drzeus.cx>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b2ab26ab
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册