Commit 54ef5b9d authored by Liam Mark's avatar Liam Mark Committed by Greg Kroah-Hartman

staging: android: ion: Initialize dma_address of new sg list

Fix the dup_sg_table function to initialize the dma_address of the new
sg list entries instead of the source dma_address entries.

Since ION duplicates the sg_list this issue does not appear to result in
an actual bug.
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
Acked-by: default avatarLaura Abbott <labbott@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2baddf26
...@@ -182,7 +182,7 @@ static struct sg_table *dup_sg_table(struct sg_table *table) ...@@ -182,7 +182,7 @@ static struct sg_table *dup_sg_table(struct sg_table *table)
new_sg = new_table->sgl; new_sg = new_table->sgl;
for_each_sg(table->sgl, sg, table->nents, i) { for_each_sg(table->sgl, sg, table->nents, i) {
memcpy(new_sg, sg, sizeof(*sg)); memcpy(new_sg, sg, sizeof(*sg));
sg->dma_address = 0; new_sg->dma_address = 0;
new_sg = sg_next(new_sg); new_sg = sg_next(new_sg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment