Skip to content
Commit f5de4699 authored by Masami Hiramatsu (Google)'s avatar Masami Hiramatsu (Google) Committed by Ulf Hansson
Browse files

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: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Fixes: 20848903 ("mmc: mediatek: Add Mediatek MMC driver")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/174972756982.3337526.6755001617701603082.stgit@mhiramat.tok.corp.google.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 539d8057
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment