Commit f5de469
mtk-sd: Prevent memory corruption from DMA map failure
If msdc_prepare_data() fails to map the DMA region, the request is
not prepared for data receiving, but msdc_start_data() proceeds
the DMA with previous setting.
Since this will lead a memory corruption, we have to stop the
request operation soon after the msdc_prepare_data() fails to
prepare it.
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
Fixes: 2084890 ("mmc: mediatek: Add Mediatek MMC driver")
Cc: [email protected]
Link: https://lore.kernel.org/r/174972756982.3337526.6755001617701603082.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Ulf Hansson <[email protected]>1 parent 539d805 commit f5de469
1 file changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
856 | 861 | | |
857 | 862 | | |
858 | 863 | | |
| |||
1484 | 1489 | | |
1485 | 1490 | | |
1486 | 1491 | | |
1487 | | - | |
| 1492 | + | |
1488 | 1493 | | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
1489 | 1504 | | |
1490 | 1505 | | |
1491 | 1506 | | |
| |||
0 commit comments