Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c46b7d2a authored by Pratik Patel's avatar Pratik Patel
Browse files

soc: qcom: memory_dump_v2: fix the end address passed to dmac_flush_range()



Fix the pointer arithmetic to ensure the end address passed in
dmac_flush_range() call doesn't go beyond the end of the
msm_dump_table.

Change-Id: Ia80ac1d6ffddb8a5313a3e106020d7e0c633b054
Signed-off-by: default avatarPratik Patel <pratikp@codeaurora.org>
parent 8c750d7e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ static int msm_dump_table_register(struct msm_dump_entry *entry)
	e->addr = entry->addr;
	table->num_entries++;

	dmac_flush_range(table, table + sizeof(struct msm_dump_table));
	dmac_flush_range(table, (void *)table + sizeof(struct msm_dump_table));
	return 0;
}

@@ -102,7 +102,7 @@ int msm_dump_data_register(enum msm_dump_table_ids id,
	e->addr = entry->addr;
	table->num_entries++;

	dmac_flush_range(table, table + sizeof(struct msm_dump_table));
	dmac_flush_range(table, (void *)table + sizeof(struct msm_dump_table));
	return 0;
}
EXPORT_SYMBOL(msm_dump_data_register);