Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 203c8018 authored by Ben Collins's avatar Ben Collins Committed by Linus Torvalds
Browse files

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: default avatarBen Collins <ben.collins@canonical.com>
Acked-by: default avatarPierre Ossman <drzeus@drzeus.cx>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b2ab26ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -46,7 +46,7 @@
#define MMC_SHIFT	3
#define MMC_SHIFT	3
#define MMC_NUM_MINORS	(256 >> MMC_SHIFT)
#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.
 * There is one mmc_blk_data per slot.