mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
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 <ben.collins@canonical.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b2ab26ab28
commit
203c80187e
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue