OSDN Git Service

soc: qcom: secure_buffer: Fix the parameter passing to dmac_flush_range
authorZhenhua Huang <zhenhuah@codeaurora.org>
Thu, 6 Sep 2018 06:27:14 +0000 (14:27 +0800)
committerGerrit - the friendly Code Review server <code-review@localhost>
Fri, 14 Sep 2018 02:43:51 +0000 (19:43 -0700)
commit371698455ce0a5015be109174ec65366e4064d28
treec17d829747fc9f68b44dd4cdfcba75592c9aa8e9
parentdffb51fe96bd2130002f8ca891845f94e5fe494c
soc: qcom: secure_buffer: Fix the parameter passing to dmac_flush_range

For "chunk_list + chunk_list_len", if the chunk_list is type of u32*,
the chunk_list_len will be 4 * of original size. So we flushed a wrong
area size. In some condition like we enabled CONFIG_DEBUG_PAGEALLOC, it
may flush out of page bound of the invalid pte page.

Fix it by manually convert it as void* when doing the addition.

CRs-Fixed: 2309993
Change-Id: I2b88d78ba73d9904fa2bf6106937001715b6037f
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
drivers/soc/qcom/secure_buffer.c