提交 5964dadd 编写于 作者: N Nikita Kiryanov 提交者: Tom Rini

omap_hsmmc: fix out of bounds array access

There are 3 MMC/SD/SDIO controllers in OMAP SoCs, but only 2 structs
are defined for devices. This leads to data being written outside of
array bounds on systems that use all 3 controllers.

Update hsmmc_dev array to the correct size.
Signed-off-by: NNikita Kiryanov <nikita@compulab.co.il>
上级 fa3a6928
......@@ -44,7 +44,7 @@
static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size);
static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
unsigned int siz);
static struct mmc hsmmc_dev[2];
static struct mmc hsmmc_dev[3];
#if defined(CONFIG_OMAP44XX) && defined(CONFIG_TWL6030_POWER)
static void omap4_vmmc_pbias_config(struct mmc *mmc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册