Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1483150 > unrolled thread
| Started by | Peter Ujfalusi <peter.ujfalusi@ti.com> |
|---|---|
| First post | 2016-09-14 12:20 +0200 |
| Last post | 2016-09-14 12:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] mmc: omap: Initialize dma_slave_config to avoid random data in it's fields Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-14 12:20 +0200
| From | Peter Ujfalusi <peter.ujfalusi@ti.com> |
|---|---|
| Date | 2016-09-14 12:20 +0200 |
| Subject | [PATCH] mmc: omap: Initialize dma_slave_config to avoid random data in it's fields |
| Message-ID | <shfsl-830-1@gated-at.bofh.it> |
It is wrong to not initialize the dma_slave_config struct as the DMAengine
driver might look at non initialized (random data) fields and tries to
interpret it.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Hi,
would it be possible to send this patch for 4.8? I have omap-dma DMAengine
driver changes pending, but they break the MMC/SD because of the uninitialized
fields in dma_slave_config.
Thanks,
Peter
drivers/mmc/host/omap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index f23d65eb070d..b49b3fa740a5 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1016,7 +1016,7 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req)
/* Only reconfigure if we have a different burst size */
if (*bp != burst) {
- struct dma_slave_config cfg;
+ struct dma_slave_config cfg = {};
cfg.src_addr = host->phys_base + OMAP_MMC_REG(host, DATA);
cfg.dst_addr = host->phys_base + OMAP_MMC_REG(host, DATA);
--
2.10.0
Back to top | Article view | linux.kernel
csiph-web